+ Reply to Thread
Results 1 to 9 of 9

Index/Match for a lookup involving 2 criteria

  1. #1
    Registered User
    Join Date
    01-28-2010
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    30

    Index/Match for a lookup involving 2 criteria

    I have a workbook attached for my problem.

    I have 2 criteria lookup using an index and match but it doesn't appear to be working quite as I would like. The problem is rather than having my criteria being exactly equal, I need my second criteria to be greater than or equal to a number which has caused some bugs.

    It's quite obvious what I'm after if you open up the workbook as I have stated my requirements and conditions. I have even got a section for you to try your own solution so I can compare against my own tries.

    Thanks in advance if you have a go at solving this, it's much appreciated!

    Oilman.
    Attached Files Attached Files
    Last edited by OilMan; 10-30-2011 at 08:24 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Index/Match for a lookup involving 2 criteria

    Try:

    =INDEX($C$3:$C$15,MATCH($N3&$O3,$A$3:$A$15&$B$3:$B$15,1))


    Only one outcome is different to your expected result ... but I think it is correct.


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-28-2010
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Index/Match for a lookup involving 2 criteria

    TMShucks,
    Thanks for the reply - that's much appreciated.
    Unfortanately, the $N3&$O3 part in the match formula is throwing me off - these are empty cells? (Or if I put the formula into column N it's a circular reference)
    Perhaps you could revise the above formula if required? I'm not sure where you put that formula to come to be able to get a match on all of my examples.
    Thanks again, mate.

  4. #4
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Index/Match for a lookup involving 2 criteria

    Perhaps using:

    Please Login or Register  to view this content.
    confirmed with Ctrl-Shift-Enter.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  5. #5
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Index/Match for a lookup involving 2 criteria

    N3 and O3 both contain data in the example sheet you posted, with the formula going in P3.

    For what it's worth I went with =INDEX(C:C,MAX(INDEX(ROW($A$3:$A$15)*($A$3:$A$15=H4)*($B$3:$B$15<=I4),0)),1)

    As with Shucks' formula this gives one results different to your expected outcome, probably the same one.

  6. #6
    Registered User
    Join Date
    01-28-2010
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Index/Match for a lookup involving 2 criteria

    Everyone,
    Thanks so much for your help. I just realised that the file on my computer is slightly varied to the one I posted here and didn't realsie some columns were different.

    Great job guys this saves me a great deal of time!

    Much appreciated to all those who helped. Added reputation to all.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Index/Match for a lookup involving 2 criteria

    Thought I uploaded this but obviously not.

    As Andrew has said, the formula goes in P3 ... "our" test area ... and uses the entries in N3 and O3.

    Anyway, take a look


    Regards
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-28-2010
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Index/Match for a lookup involving 2 criteria

    Great, works a treat!
    (I'm not sure how to change the title of this thread to solved....)

  9. #9
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Index/Match for a lookup involving 2 criteria

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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