+ Reply to Thread
Results 1 to 6 of 6

how to calculate times based on two variables

  1. #1
    Registered User
    Join Date
    05-10-2014
    MS-Off Ver
    Excel 2003
    Posts
    2

    how to calculate times based on two variables

    Dear excel pros,

    I'm having a problem with what formulas to use on attached sheet:
    arrival times.xlsx

    There are two tabs in my sheet. "calculation sheet" that shows names, arriving airport and flight arriving time.
    Basically I need to count estimated arrival time of "name" based on other two variables with regards to people arriving at certain destination:
    airport that person is are arriving into
    time he/she boards the train to destination

    ...taken from tab "arrival times" where I will manually input data based on actual train timetables.

    In real life I don't have to calculate 3 people but around 100 but i'm struggling so far with find a proper formula to make my life easier!

    Your help is much appreciated.

    Thank you in advance.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,904

    Re: how to calculate times based on two variables

    Will there only be three location to manage? MUC, GVA and ZRH?
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    05-10-2014
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: how to calculate times based on two variables

    Quote Originally Posted by alansidman View Post
    Will there only be three location to manage? MUC, GVA and ZRH?
    Hi alansidman,

    Thanks for looking into this post... Yes there will be only 3!

    Regards,

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: how to calculate times based on two variables

    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    1
    Airport
    Flt Arr
    Train Dep
    Train Arr
    Who
    Airport
    Flt Arr
    Train Arr
    2
    GVA
    09:15
    10:00
    12:30
    John
    MUC
    09:50
    12:00
    I2: {=INDEX($D$2:$D$12, MATCH(G2 & H2, $A$2:$A$12 & $B$2:$B$12, 0))}
    3
    GVA
    09:35
    10:00
    12:30
    Mike
    MUC
    12:20
    15:00
    4
    GVA
    12:50
    13:30
    16:00
    Many
    GVA
    12:50
    16:00
    5
    GVA
    14:30
    15:15
    17:45
    Lindsey
    ZRH
    11:35
    15:00
    6
    GVA
    15:40
    16:15
    18:45
    7
    ZRH
    08:40
    10:00
    13:00
    8
    ZRH
    11:35
    12:00
    15:00
    9
    ZRH
    14:40
    15:30
    18:30
    10
    MUC
    09:50
    11:00
    12:00
    11
    MUC
    12:20
    14:00
    15:00
    12
    MUC
    15:35
    17:00
    18:00


    The curly braces means that the formula MUST be confirmed with Ctrl+Shift+Enter instead of just Enter. You can't enter the braces manually.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,904

    Re: how to calculate times based on two variables

    An alternative solution if you wish to keep your spreadsheet as you currently have formatted.
    In D2:
    =IF(B2="MUC",VLOOKUP(C2,'Arrival Times'!$I$2:$K$4,3,FALSE),IF(B2="GVA",VLOOKUP(C2,'Arrival Times'!$A$2:$C$6,3,FALSE),VLOOKUP(C2,'Arrival Times'!$E$2:$G$4,3,FALSE))) and copy down.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: how to calculate times based on two variables

    I named the three ranges on the Arrival Times worksheet GVA, ZRH and MUC then used these names in a simple VLOOKUP.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The file should be self explanatory.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. calculate cycle time based on other variables
    By brywhi11 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-05-2013, 10:34 AM
  2. Formula to calculate single cell based on many variables
    By malawimick in forum Excel General
    Replies: 7
    Last Post: 12-15-2011, 02:13 AM
  3. Replies: 0
    Last Post: 11-14-2011, 05:40 PM
  4. Replies: 2
    Last Post: 05-14-2008, 04:57 PM
  5. Selecting patient data based on multiple variables to calculate mean and SD
    By Andrew! in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2008, 02:14 PM

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