+ Reply to Thread
Results 1 to 11 of 11

Two way (Row & Column) lookup using Index Match

  1. #1
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2019
    Posts
    431

    Two way (Row & Column) lookup using Index Match

    Hi,

    Need a Two Way lookup formula using Index Match function.

    An excel file attached with necessary details.

    Pl. help.

    Thanks,
    Nagesh.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Two way (Row & Column) lookup using Index Match

    In D3:

    =INDEX($K$3:$T$12,MATCH(1,($I$3:$I$12=A3)*($J$3:$J$12=B3),0),MATCH(C3,$K$2:$T$2,0))

    Array enter with CSE, then copy down.
    Attached Files Attached Files
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,443

    Re: Two way (Row & Column) lookup using Index Match

    Cell D3 formula , Drag down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Two way (Row & Column) lookup using Index Match

    try
    =INDEX($J$3:$T$12,MATCH(A3,$I$3:$I$12,0),MATCH(C3,$K$2:$T$2,0))

    I have used ROLE ID as i assume that would be unique to the individual

    if the cell is blank it will return a zero
    we can remove that with an IF

    =IF(INDEX($J$3:$T$12,MATCH(A3,$I$3:$I$12,0),MATCH(C3,$K$2:$T$2,0))=0,"no Entry",INDEX($J$3:$T$12,MATCH(A3,$I$3:$I$12,0),MATCH(C3,$K$2:$T$2,0)))
    Or just leave the cell blank
    =IF(INDEX($J$3:$T$12,MATCH(A3,$I$3:$I$12,0),MATCH(C3,$K$2:$T$2,0))=0,"",INDEX($J$3:$T$12,MATCH(A3,$I$3:$I$12,0),MATCH(C3,$K$2:$T$2,0))
    Attached Files Attached Files
    Last edited by etaf; 04-15-2024 at 08:55 AM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,738

    Re: Two way (Row & Column) lookup using Index Match

    Quote Originally Posted by etaf View Post
    ... if the cell is blank it will return a zero
    we can remove that with an IF ...
    Wayne, as it is text values that we are retrieving, you can just add &"" to the end of your first formula to avoid the zero if blank - avoids having to do the lookup twice.

    Hope this helps.

    Pete

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Two way (Row & Column) lookup using Index Match

    wow - thats cool
    =INDEX($J$3:$T$12,MATCH(A3,$I$3:$I$12,0),MATCH(C3,$K$2:$T$2,0))&""
    thanks
    never knew that - will save loads of lookups on various forums where i have suggested the IF()
    Thanks again, for taking the time to advise
    Last edited by etaf; 04-15-2024 at 08:54 AM.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,738

    Re: Two way (Row & Column) lookup using Index Match

    A related tip is for when numbers are being retrieved, and zero is not a valid value - you can do this:

    =IFERROR(1/(1/lookup_formula),"")

    I first saw that one from Biff (Tony Valko), who no longer contributes here.

    Pete

  8. #8
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Two way (Row & Column) lookup using Index Match

    thanks for the follow-up , as was about to ask, but had to go hunting wifes phone - which she dropped ...... while out

  9. #9
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2019
    Posts
    431

    Re: Two way (Row & Column) lookup using Index Match

    Thank you @Ali, wk9128, Wayne and Pete its working fine.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Two way (Row & Column) lookup using Index Match

    Glad to have helped.

    If you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  11. #11
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Two way (Row & Column) lookup using Index Match

    you are welcome

+ 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] Index match not working if lookup column contains formulas?
    By Filos in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-15-2021, 04:49 PM
  2. [SOLVED] Lookup (index/match) and return column headers
    By Barslund in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-08-2017, 06:01 AM
  3. Index / Match or other function to lookup 3 values and return column D
    By t83357 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-08-2016, 07:01 PM
  4. Replies: 7
    Last Post: 07-26-2015, 04:02 PM
  5. Replies: 2
    Last Post: 11-13-2014, 11:22 AM
  6. [SOLVED] Index-Match-Lookup for Last Value in a column - Glitch or Solution?
    By Btray90 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-04-2013, 08:38 PM
  7. Multiple column lookup using index match
    By adaws in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-22-2013, 11:43 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