+ Reply to Thread
Results 1 to 4 of 4

Lookup One Value But in Multiple Columns

  1. #1
    Registered User
    Join Date
    05-15-2020
    Location
    North America
    MS-Off Ver
    Office365 (v2209)
    Posts
    29

    Lookup One Value But in Multiple Columns

    I need to lookup a single value but search in multiple columns. Then I want to return values from different columns. It's like doing an XLOOKUP or VLOOKUP except the value I'm looking for is in separate columns and so is the value I want to return. I have attached an example. Each row of data contains patient information and the different tests they've. In another file, I have just the test serial number. So I need to match up the data from the 2 lists using the serial number and determine what type of test it was. There's only 1 row per patient so if they have taken 2 or 3 tests (max is 3), the first test will be in the first column with the type if text int he next and so on. I've tried nesting V and XLOOKUPs but it doesn't work. Any suggestions?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Lookup One Value But in Multiple Columns

    B3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    filled down as far as needed. If the ID in A3 doesn't exist in any of the 3 tables, this returns #N/A. If you want something else, wrap the 3rd VLOOKUP call in a 3rd IFERROR call.

    Tangent: FWIW, perhaps MSFT could steal a feature from Google Sheets, in which this could be accomplished using

    B3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by hrlngrv; 03-12-2021 at 06:07 PM. Reason: addendum

  3. #3
    Registered User
    Join Date
    05-15-2020
    Location
    North America
    MS-Off Ver
    Office365 (v2209)
    Posts
    29

    Re: Lookup One Value But in Multiple Columns

    Quote Originally Posted by hrlngrv View Post
    B3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    filled down as far as needed. If the ID in A3 doesn't exist in any of the 3 tables, this returns #N/A. If you want something else, wrap the 3rd VLOOKUP call in a 3rd IFERROR call.

    Tangent: FWIW, perhaps MSFT could steal a feature from Google Sheets, in which this could be accomplished using

    B3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thanks. That works nicely! It doesn't seem to make a difference that the lookup columns aren't sorted in ascending order. I always thought hat was required for VLOOKUP.

  4. #4
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Lookup One Value But in Multiple Columns

    Quote Originally Posted by SweetBaboo View Post
    . . . It doesn't seem to make a difference that the lookup columns aren't sorted in ascending order. . . .
    That's what VLOOKUP's 4th argument determines. When it's 0 or FALSE, VLOOKUP performs exact matching on 1st columns which don't need to be sorted; exact in italics because the 1st argument could include ? and * wildcards, so not exactly exact.

+ 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. Replies: 1
    Last Post: 02-12-2021, 07:21 PM
  2. [SOLVED] Lookup multiple criteria in multiple columns in multiple rows; return true if exists
    By ufdlim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-07-2019, 02:03 PM
  3. Replies: 3
    Last Post: 04-08-2014, 03:11 AM
  4. Replies: 0
    Last Post: 10-16-2013, 12:42 PM
  5. [SOLVED] Multiple lookup adding columns, then multiplying, then lookup, add, and subtract
    By mamig in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-08-2013, 12:55 AM
  6. Lookup Data in One Column, Find Multiple Entries in Next, Copy to Multiple Columns
    By nzxt1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-16-2010, 01:17 AM
  7. Lookup adjacent column to multiple lookup columns.
    By JAMES4228 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-13-2009, 03:19 PM

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