+ Reply to Thread
Results 1 to 10 of 10

Formula for Table/Row Linking based on a Time Period

  1. #1
    Registered User
    Join Date
    05-26-2021
    Location
    Perth, Australia
    MS-Off Ver
    365
    Posts
    9

    Formula for Table/Row Linking based on a Time Period

    Hi,

    I would like to access/use data from one row in a table, that must be within a specified time period (columns for start and end dates and where there is no End Date, it is assumed current), in other table using some formula. This is hard to explain, so I have attached a simplified Excel file which may offer some context and clarity to my question.

    Please note, in this file there are a couple other issues I am trying to address, but the primary one is this time interval one.

    Any help would be greatly appreciated.

    Cheers,
    Luke
    Attached Files Attached Files
    Last edited by lucaskre8; 04-20-2024 at 05:29 AM. Reason: Updated file

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: Formula for Table/Row Linking based on a Time Period

    Where are we meant to be looking? Where have you manually mocked up expected results? Better to strip out anything that's not relevant.
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: Formula for Table/Row Linking based on a Time Period

    Oh, I think I see now.

    Why not just this?

    =VLOOKUP([@HoleID],Collar,3,0)

  4. #4
    Registered User
    Join Date
    05-26-2021
    Location
    Perth, Australia
    MS-Off Ver
    365
    Posts
    9

    Re: Formula for Table/Row Linking based on a Time Period

    Thanks Ali, I'll have a look.

    I just uploaded a cut down Excel version which focusses on the Date Interval problem

  5. #5
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: Formula for Table/Row Linking based on a Time Period

    OK - looking at your CUT workbook, I cannot see where you have MOCKED UP your expected results. Which column, please?

    Please add calculated results manually so that we can see what you are after.
    Last edited by AliGW; 04-20-2024 at 05:23 AM. Reason: Typo fixed.

  6. #6
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: Formula for Table/Row Linking based on a Time Period

    To be clear - please fill in the yellow section MANUALLY to show the results you expect for this sample:

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    G
    H
    I
    J
    1
    HoleID
    Date Measured
    mBTOC
    mBGL
    2
    H1
    10/01/2024
    10
    3
    H2
    10/01/2024
    20
    4
    H3
    10/01/2024
    30
    5
    H1
    10/04/2024
    11
    6
    H2
    10/04/2024
    22
    7
    H3
    10/04/2024
    33
    Sheet: Sheet1

  7. #7
    Registered User
    Join Date
    05-26-2021
    Location
    Perth, Australia
    MS-Off Ver
    365
    Posts
    9

    Re: Formula for Table/Row Linking based on a Time Period

    Thanks again Ali, yes new version attached, I hope this makes it clearer

  8. #8
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: Formula for Table/Row Linking based on a Time Period

    OK - try this:

    =LET(f,FILTER($A$2:$C$5,$A$2:$A$5=G2),I2-XLOOKUP(H2,INDEX(f,,3),INDEX(f,,2),"N/A",-1))

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    Attached Files Attached Files
    Last edited by AliGW; 04-20-2024 at 05:44 AM.

  9. #9
    Registered User
    Join Date
    05-26-2021
    Location
    Perth, Australia
    MS-Off Ver
    365
    Posts
    9

    Re: Formula for Table/Row Linking based on a Time Period

    Thanks, and thanks for the previous help as well. I'll see if i can work out my other problem myself, before starting a new thread.

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: Formula for Table/Row Linking based on a Time Period

    You're welcome!

    You'll certainly learn more by trying to work things out, but if you ever need an explanation of a solution given, just ask.

+ 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. Formula to add rows based on time period
    By ben.cote in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-23-2023, 04:38 PM
  2. [SOLVED] Calculate the portion of a planned number during a period, based on another time period
    By BryGuy81 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2017, 01:29 PM
  3. [SOLVED] Dynamic Formula Based on User Entered Period of Time
    By skywriter in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-08-2015, 03:46 PM
  4. Replies: 6
    Last Post: 04-20-2015, 07:22 AM
  5. converting a minute table to a different time period
    By freak11 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-22-2014, 10:50 AM
  6. [SOLVED] Complicated:Calculate time period based on no. of units sold + fluctuations within period
    By omaha.crab in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2012, 03:04 AM
  7. Replies: 2
    Last Post: 04-27-2011, 08:21 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