+ Reply to Thread
Results 1 to 5 of 5

Multiple criteria lookup using date range

  1. #1
    Registered User
    Join Date
    08-08-2008
    Location
    ny
    MS-Off Ver
    365 version 2402
    Posts
    75

    Multiple criteria lookup using date range

    Hello,

    I am trying to create a lookup using multiple criteria that compares a date to date ranges to pull back a result. I was looking at index and match but this is beyond my skill level and hoped someone could help.

    Basically I am trying to say return the year in the lookup table when the ID matches and the date is greater than equal to the begin and less than or equal to the end date.

    Criteria Expected Result |Lookup Table
    ID Date Year |ID Begin Date End Date Year
    CY 1/2/2020 2020 |CY 1/1/2020 12/31/2020 2020
    CY 5/2/2021 2021 |CY 1/1/2021 12/31/2021 2021
    VA 7/24/2020 2021 |VA 5/1/2019 4/30/2020 2020
    VA 9/13/2019 2020 |VA 5/1/2020 4/30/2021 2021
    YR 5/24/2020 2020 |VA 5/1/2021 4/30/2022 2022
    YR 10/23/2021 2022 |YR 7/1/2019 6/30/2020 2020
    |YR 7/1/2020 6/30/2021 2021
    |YR 7/1/2021 6/30/2022 2022


    I will also try and upload the sheet to make it easier.

    Thanks for the help

    Stephen
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,466

    Re: Multiple criteria lookup using date range

    You can use this array* formula in cell C3:

    =INDEX($I$3:$I$10,MATCH(1,($F$3:$F$10=A3)*(B3>=$G$3:$G$10)*(B3<=$H$3:$H$10),0))

    *Note that an array formula needs to be confirmed using the key combination of Ctrl-Shift-Enter (CSE), rather than the usual Enter.

    Copy down as required.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    01-11-2021
    Location
    CANADA
    MS-Off Ver
    Excel 365
    Posts
    73

    Re: Multiple criteria lookup using date range

    In C3: =SUMIFS(I$3:I$10,F$3:F$10,A3,G$3:G$10,"<="&B3,H$3:H$10,">="&B3)

  4. #4
    Registered User
    Join Date
    12-04-2020
    Location
    Bangkok
    MS-Off Ver
    365
    Posts
    61

    Re: Multiple criteria lookup using date range

    Another alternative,

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-08-2008
    Location
    ny
    MS-Off Ver
    365 version 2402
    Posts
    75

    Re: Multiple criteria lookup using date range

    Wow, a few different ways. Thank you for helping me out.

+ 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. [SOLVED] Merge Vlookup & Lookup With lookup criteria of name & Date Range
    By ravishekhar89 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-30-2021, 06:29 AM
  2. [SOLVED] Lookup formula with multiple criteria - find if date is within range
    By mazarin in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 04-02-2015, 09:01 AM
  3. [SOLVED] Lookup value based on date range and multiple criteria
    By jsclark in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-07-2014, 06:23 PM
  4. Excel Lookup with multiple criteria and date range match
    By denniswtlx in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-06-2013, 02:25 PM
  5. Replies: 10
    Last Post: 02-19-2013, 12:05 PM
  6. Replies: 11
    Last Post: 02-07-2013, 02:22 AM
  7. Replies: 1
    Last Post: 05-16-2011, 05:00 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