+ Reply to Thread
Results 1 to 9 of 9

Look up a value from multiple columns and return an adjacent value

Hybrid View

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    3

    Look up a value from multiple columns and return an adjacent value

    I have 3 sets of data, each with a number and a text description beside it. I need to be able to look up the text description among any of the 3 columns, and return its adjacent value. What complicates it further is that the value is to the left of the text. I've attached a simplified example of what this looks like.

    In the example, I need to be able to look up "red" in columns B & E, and it return the value "111".

    Does anyone know how to accomplish this with a formula?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,329

    Re: Look up a value from multiple columns and return an adjacent value

    =IFERROR(INDEX($A$1:$A$3,MATCH(A6,$B$1:$B$3,0)),INDEX($D$1:$D$3,MATCH(A6,$E$1:$E$3,0)))
    Try this one
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Registered User
    Join Date
    10-07-2013
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Look up a value from multiple columns and return an adjacent value

    Thanks Popipipo.... I am still on Excel 2003 at work. Can you think of how else I can do it without IFERROR?

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Look up a value from multiple columns and return an adjacent value

    Maybe this...

    =SUMIF(B$1:B$3,A6,A$1:A$3)+SUMIF(E$1:E$3,A6,D$1:D$3)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Look up a value from multiple columns and return an adjacent value

    Quote Originally Posted by Tony Valko View Post
    Maybe this...

    =SUMIF(B$1:B$3,A6,A$1:A$3)+SUMIF(E$1:E$3,A6,D$1:D$3)
    or even..
    =SUMIF(B$1:E$3,A6,A$1:D$3)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Look up a value from multiple columns and return an adjacent value

    I thought about that but figured if the tables aren't exactly as those in the sample file then that may not work.

  7. #7
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,329

    Re: Look up a value from multiple columns and return an adjacent value

    =if(iserror(index($a$1:$a$3,match(a6,$b$1:$b$3,0))),index($d$1:$d$3,match(a6,$e$1:$e$3,0)),index($a$1:$a$3,match(a6,$b$1:$b$3,0)))
    I hope this will work

  8. #8
    Registered User
    Join Date
    10-07-2013
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Look up a value from multiple columns and return an adjacent value

    Tony Valko - I tried yours in my actual tables and it worked

    Thanks everyone for your suggestions!

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Look up a value from multiple columns and return an adjacent value

    You're welcome. Thanks for the feedback!

+ 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. How to find closest values in multiple columns and return adjacent values.
    By Patrician in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-28-2013, 01:47 PM
  2. [SOLVED] How to return 3 columns not adjacent to another worksheet with 2 criteria
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 10-25-2012, 02:29 AM
  3. Replies: 3
    Last Post: 02-15-2012, 01:18 AM
  4. Copy formulas to adjacent columns - multiple cells and multiple sheets
    By swanseaexcel in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-12-2011, 06:21 AM
  5. Compare values in two columns and return text from adjacent cell
    By MrBorders in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-04-2009, 04:54 AM

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