+ Reply to Thread
Results 1 to 6 of 6

Find value in range with two criterias, INDEX MATCH MAX

  1. #1
    Forum Contributor
    Join Date
    07-21-2010
    Location
    Alta, Norway
    MS-Off Ver
    Excel 2003
    Posts
    119

    Find value in range with two criterias, INDEX MATCH MAX

    Hi guys,

    I am struggling with a INDEX,MATCH and MAX formula. I am trying to retrive values from column E with two criterias:
    1. That the value in column C is equal to a lookup value
    2. That the date in column A is the closest before date for a lookup date

    I have attatched an example file that hopefully will explain better.

    I would really appreciate all help

    Gnoke
    Attached Files Attached Files

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Find value in range with two criterias, INDEX MATCH MAX

    Try this array formula

    =INDEX(Data!E:E,MATCH(1,(DATE(RIGHT(A8,4),MID(A8,4,2),1)=Data!D:D)*(D8=Data!C:C),0))

    Cmmit with Ctrl-Shift-Enter, not just Enter

  3. #3
    Forum Contributor
    Join Date
    07-21-2010
    Location
    Alta, Norway
    MS-Off Ver
    Excel 2003
    Posts
    119

    Re: Find value in range with two criterias, INDEX MATCH MAX

    Thanks for answering!

    The formula works well for the sample sheet, but not with my original (much larger) dataset. It is not always the month and date values are available in both sheets. Therefor I try to search for the closest before date and not an exact match.
    Any ideas?

    Thanks again

    Gnoke

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Find value in range with two criterias, INDEX MATCH MAX

    Your "Data" Sheet dates seem to consistantly be the first of the month, is this always the case?

    The dates in your "Test" Sheet are inconsistant, strings and real dates.
    Try in a spare column, say Column B
    In B8
    Please Login or Register  to view this content.
    Drag/Fill Down
    Then in F8, this array formula
    Please Login or Register  to view this content.
    Confirm with Ctr+Shift+Enter not just Enter.
    Drag/Fill Down
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Find value in range with two criterias, INDEX MATCH MAX

    Quote Originally Posted by gnoke View Post
    Thanks for answering!

    The formula works well for the sample sheet, but not with my original (much larger) dataset. It is not always the month and date values are available in both sheets. Therefor I try to search for the closest before date and not an exact match.
    Any ideas?

    Thanks again

    Gnoke
    Oh, I concluded that there were always dates for the 1st of each month, so I transformed the lookup dates.

  6. #6
    Registered User
    Join Date
    05-26-2014
    Posts
    1

    Re: Find value in range with two criterias, INDEX MATCH MAX

    May I ask the question here?
    I have 2 sheets in excel with some data.
    I need to find a match between two columns in each sheet and then by the recent date criteria extract the data from the third column in first sheet.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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