+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : INDEX and MATCH question

  1. #1
    Registered User
    Join Date
    03-24-2010
    Location
    Oxford
    MS-Off Ver
    Excel 2007
    Posts
    16

    INDEX and MATCH question

    Help Needed.

    I am attempting to lookup in an array 2 pieces of information to give me the corresponding result. I am usinf the formula below that works fine.

    =IFERROR(INDEX(Hotel!$A$2:$BV$2076,MATCH(Transfer!$A2,Hotel!$A$2:$A$2076,0),MATCH(Transfer!$C2,Hotel!$A$1:$BV$1,0)),"")

    The issue is that there are multiple matches to the conditions i set, however one match always returns an emty value,see attached.

    In the 'Transfer tab i want to look up the 'Primary Guest ID number' and the 'Asset Date' against the information in the 'Hotel' tab but you will notice that the ID number is displayed multiple times in the 'Hotel' tab. How do i get the formula to move onto the next match if the value is null??
    Attached Files Attached Files

  2. #2
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: INDEX and MATCH question

    Hi and welcome to the forum. Hope it works for you

    =INDEX(Hotel!$A$2:$BL$11,SMALL(IF(A2-Hotel!$A$2:$A$28,ROW(INDIRECT("1:"&ROWS(Hotel!$A$2:$A$28)))),COUNTIF($A$2:A2,A2)),MATCH(C2,Hotel!$A$1:$BL$1,0))

    confirm w/ ctrl+shift+enter and copy down
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,997

    Re: INDEX and MATCH question

    You could also use:
    =IFERROR(LOOKUP(2,1/((Hotel!$A$2:$A$11=$A2)*(INDEX(Hotel!$A$2:$BL$11,,MATCH($C2,Hotel!$A$1:$BL$1,0))<>"")),INDEX(Hotel!$A$2:$BL$11,,MATCH($C2,Hotel!$A$1:$BL$1,0))),"")

    If you can store the column match in another column, it would be more efficient.
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Registered User
    Join Date
    03-24-2010
    Location
    Oxford
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: INDEX and MATCH question

    Thanks for the replies.

    As you can see in the attached i have tried both formulas however i still get blank cells.

    Any other ideas??
    Attached Files Attached Files

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,997

    Re: INDEX and MATCH question

    That's because there is no data matching your criteria...

  6. #6
    Registered User
    Join Date
    03-24-2010
    Location
    Oxford
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: INDEX and MATCH question

    Good point...well made!

    Thanks for your help

+ 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