+ Reply to Thread
Results 1 to 19 of 19

Calculate time of arrival with IF condition based on departure

  1. #1
    Registered User
    Join Date
    05-27-2020
    Location
    Romania
    MS-Off Ver
    Office 365 ProPlus
    Posts
    58

    Calculate time of arrival with IF condition based on departure

    Hello everyone,

    I need bit of help with the sheet attached.

    I have to calculate the time of arrival from a to b with the condition that there might be 2 different departure places.

    For example, i have column C (Departure) and column D (arrival). Now, in sheet TimpDistanta i set up the time that takes to transit from C to D.

    Now, this is a transport plan, and in some cases, one truck might load from Campus Calan, go to one city and after that to the next, so in column C will appear 2 departure places.

    So, the result should be like this:

    Row 2 and 3, same truck, 2 deliveries, calculate in column Y the time on the clock (you can shitch to AM/PM if you like) of arrival to every store.
    Row 3, different truck, 1 delivery, calculate in column Y time o arrival.

    And so on.....

    A bit of help with translation, Column P is departure time, column X is time it takes (number of hrs) from C to B

    Thank you!
    Attached Files Attached Files
    Last edited by Havreliuc; 05-25-2022 at 07:28 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: IF Function

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Time calculation formula

    The new title is still generic. Please add more detail to it. Thanks.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Calculate time of arrival with IF condition based on departure

    Thank you - your title is now acceptable.

  5. #5
    Registered User
    Join Date
    05-27-2020
    Location
    Romania
    MS-Off Ver
    Office 365 ProPlus
    Posts
    58

    Re: Calculate time of arrival with IF condition based on departure

    No one? Is it even possible?

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Calculate time of arrival with IF condition based on departure

    Please relook at your sample workbook. It does not correspond to your wordings. Row 2 is the column headers. Please change the column header names to English and delete or hide unnecessary columns. How do we know the same truck is in used? Where do you want your results to be shown? Please provide the expected results manually.

  7. #7
    Registered User
    Join Date
    05-27-2020
    Location
    Romania
    MS-Off Ver
    Office 365 ProPlus
    Posts
    58

    Re: Calculate time of arrival with IF condition based on departure

    Sorry, your right.

    Please see now, hope this time is Ok.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Calculate time of arrival with IF condition based on departure

    Please hide columns we don't need to see/know. Still no expected results shown.

  9. #9
    Registered User
    Join Date
    05-27-2020
    Location
    Romania
    MS-Off Ver
    Office 365 ProPlus
    Posts
    58

    Re: Calculate time of arrival with IF condition based on departure

    Ok, made it simple this time.

    Please note that for a truck with 2 destinations, there is a 2hr (time it takes to unload at 1st store), that sould be in the formula.

    Hope now it's ok.
    Attached Files Attached Files

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Calculate time of arrival with IF condition based on departure

    There are no expected results in column H.

  11. #11
    Registered User
    Join Date
    05-27-2020
    Location
    Romania
    MS-Off Ver
    Office 365 ProPlus
    Posts
    58

    Re: Calculate time of arrival with IF condition based on departure

    Yes, that is where the formula should give me the time of arrival. Column F2 (time when the truck left Campus Calan) + 8 hr = 18:00 (or 6PM) + 02:00hr time to unload + 1:45 (time from B2 to C2) = 21:45 (or 09:45 PM) in H2

  12. #12
    Registered User
    Join Date
    05-27-2020
    Location
    Romania
    MS-Off Ver
    Office 365 ProPlus
    Posts
    58

    Re: Calculate time of arrival with IF condition based on departure

    I have a formula but does not work

    =IF(B2="CAMPUS CALAN";SUM(F2+G2);SUM(H3+G2+$L$3))

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Calculate time of arrival with IF condition based on departure

    Nr of hr from C to D
    Should this be from B to C?

  14. #14
    Registered User
    Join Date
    05-27-2020
    Location
    Romania
    MS-Off Ver
    Office 365 ProPlus
    Posts
    58

    Re: Calculate time of arrival with IF condition based on departure

    Yes, my mistake, sorry!

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Calculate time of arrival with IF condition based on departure

    Try this:

    =IFERROR(IF(B2<>"CAMPUS CALAN",F3+G3+$L$3+G2,F2+G2),F2+G2)

    For your locale:

    =IFERROR(IF(B2<>"CAMPUS CALAN";F3+G3+$L$3+G2;F2+G2);F2+G2)

  16. #16
    Registered User
    Join Date
    05-27-2020
    Location
    Romania
    MS-Off Ver
    Office 365 ProPlus
    Posts
    58

    Re: Calculate time of arrival with IF condition based on departure

    Yes, this is it, thank you, Ali!

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Calculate time of arrival with IF condition based on departure

    Glad to have helped.

  18. #18
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Calculate time of arrival with IF condition based on departure

    Delete delete

  19. #19
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Calculate time of arrival with IF condition based on departure

    Departure hr F2=IF(B2="CAMPUS CALAN",E2+$L$6,FILTER($H$2:$H$14,($A$2:$A$14=A2)*($B$2:$B$14="CAMPUS CALAN")*($D$2:$D$14=D2))+$L$3)
    Estimated hr of arrival to store H2=F2+G2
    with Unloading time at 1st store at L3=2:00 and Loading time at L6=1:00
    Last edited by josephteh; 05-25-2022 at 11:10 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Right function, Left function, Mid function to extract values in column A
    By bjnockle in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 06-14-2020, 03:14 PM
  2. COUNTUNIQUE Function in Google Sheets; Excel lacks a direct counterpart to this function?
    By PivotTablePSHomage in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2018, 05:27 AM
  3. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  4. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  5. Replies: 2
    Last Post: 01-15-2014, 11:40 PM
  6. index function error using match function to get data from a cell in an array
    By mabildgaard in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-17-2013, 02:21 AM
  7. Replies: 1
    Last Post: 03-21-2012, 11:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1