+ Reply to Thread
Results 1 to 7 of 7

Lookup value based on date range and multiple criteria

  1. #1
    Registered User
    Join Date
    04-17-2007
    Posts
    17

    Lookup value based on date range and multiple criteria

    I have three spreadsheets. I am looking for a formula that will Lookup the CODE in Sheet 2 that matches C1 & B2 in Sheet 3 and return the value in Sheet 1 for that CODE that falls in the Date Range in Sheet 1 B1: H2. I have attached a sample of what I am working with and hoping someone can assist? Thank you in advance to taking the time to look!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Lookup value based on date range and multiple criteria

    try this, copied down and across...
    =IFERROR(INDEX(Sheet1!$A$2:$H$6,MATCH(INDEX(Sheet2!$B$1:$G$5,MATCH(Sheet3!$B2,Sheet2!$B$1:$B$5,0),MATCH(Sheet3!C$1,Sheet2!$B$1:$G$1,0)),Sheet1!$A$2:$A$6,0),MATCH(Sheet3!C$1,Sheet1!$A$2:$H$2,0)),B2)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-17-2007
    Posts
    17

    Re: Lookup value based on date range and multiple criteria

    I tried it and it didn't return an error which is WAY further than I was able to get, but when the formula is copied over to where the date changes to the next segment of the DATE RANGE in Sheet 1 (in this example changing to 1/1/2016 or later) it value that is returned is still matching to the 1/1/2015 - 12/31/2015 date range.

  4. #4
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Lookup value based on date range and multiple criteria

    =IFERROR(INDEX(Sheet1!$C$3:$H$6,MATCH(INDEX(Sheet2!$C$2:$M$5,MATCH($B2,Sheet2!$B$2:$B$5,0),MATCH(C$1,Sheet2!$C$1:$M$1,0)),Sheet1!$A$3:$A$6,0),MATCH(YEAR(C$1)&MONTH(Sheet1!$C$2:$H$2),YEAR(Sheet1!$C$2:$H$2)&MONTH(Sheet1!$C$2:$H$2),0)),"")
    Confirm COntrol+Shift+Enter
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  5. #5
    Registered User
    Join Date
    04-17-2007
    Posts
    17

    Re: Lookup value based on date range and multiple criteria

    When I copy it over it returns blank results beginning at 6/1/2015. If I change D2 to 4/1/2016 it returns a blank result as well. This formula is so far beyond my Excel skills I wouldn't even know where to begin trying to find where or why it stops working on the later dates...any ideas?

  6. #6
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Lookup value based on date range and multiple criteria

    LookupTest-1.xlsx
    Please see attached.
    You need to extend all ranges and add data or copy this formula to your main sheet and then extend all ranges

  7. #7
    Registered User
    Join Date
    04-17-2007
    Posts
    17

    Re: Lookup value based on date range and multiple criteria

    OMG! Can I just say that is AMAZING! Every time I come to this forum I am reminded of how little I know about the capabilities of Excel. Thank you so much! I was muddling through trying to solve that formula for days! I think it will take me a little bit of studying to understand all of it....Thank you so much!

+ 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] Collate (lookup) Multiple orders at the same time, based on DATE range in a table
    By Prodschdler in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-05-2013, 05:19 PM
  2. 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
  3. Replies: 10
    Last Post: 02-19-2013, 12:05 PM
  4. Replies: 11
    Last Post: 02-07-2013, 02:22 AM
  5. Multiple lookup based on date range pricing
    By posttoamit in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-18-2011, 05:52 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