+ Reply to Thread
Results 1 to 5 of 5

Thread: INDEX MATCH Function

  1. #1
    Registered User
    Join Date
    01-13-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    12

    INDEX MATCH Function

    Hi,

    I have attached a sample file to explain my query better.

    I col A i have a list of names and in Cells E2:L4 i have a table which tells me what each persons option is.

    I would like Col B to automatically let me know which Option they have chosen.

    Col C shows what the values should be.

    I have tried INDEX and Match but it doesn't seem to be working - maybe something simple but any help wouldf be gratefully aprreciated.

    Many thanks
    Attached Files Attached Files
    Last edited by timbellamy; 07-15-2010 at 11:25 AM.

  2. #2
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: INDEX MATCH Function

    A few options, one might be:

    B2:
    =IF(COUNTIF($E$3:$L$4,$A2),INDEX($E$2:$L$2,MIN(IF($E$3:$L$4=$A2,COLUMN($E$2:$L$2)-COLUMN($E$2)+1))),"")
    confirmed with CTRL + SHIFT + ENTER
    copied down

    Note: Array entry ... confirming with Enter alone will not suffice.

    If you do have only two rows of data:

    B2:
    =INDEX($E$2:$L$2,MATCH($A2,INDEX($E$3:$L$4,1+(COUNTIF($E$4:$L$4,$A2)>0),0),0))
    confirmed with Enter
    copied down

  3. #3
    Registered User
    Join Date
    01-13-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: INDEX MATCH Function

    That works great thank you. I have actually got 10 rows of data but have taken the 1st one and amended it.

    Just for future reference will the 2nd formula only ever work with 2 rows or could this be amended to work with 10 (or more rows). The people who will use the worksheet eventually may not remember to SHIFT+CTRL+ENTER.

    Many thanks

  4. #4
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: INDEX MATCH Function

    The 2nd suggestion is not viable for 10 rows of data, no.

    Conducting searches within Matrices is rarely efficient I'm afraid.

    To circumvent the need for CSE entry you can embed an INDEX:

    B2:
    =IF(COUNTIF($E$3:$L$4,$A2),INDEX($E$2:$L$2,-MIN(INDEX(-(($E$3:$L$4=$A2)*(COLUMN($E$3:$L$3)-COLUMN($E$3)+1)),0))),"")
    confirmed with Enter
    copied down

    However, the above will be no more efficient than the Array indeed with large datasets it would most likely prove slower.

  5. #5
    Registered User
    Join Date
    01-13-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: INDEX MATCH Function

    Fair enough, thank you very much.

    Really appreciate all the help this forum gives me.

    Many thanks

+ 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.2.0