+ Reply to Thread
Results 1 to 6 of 6

Lookup value from either of 2 columns and return value in column 3 all on 1 row

  1. #1
    Registered User
    Join Date
    07-28-2016
    Location
    Sydney, Australia
    MS-Off Ver
    Excel for Mac 2011
    Posts
    10

    Lookup value from either of 2 columns and return value in column 3 all on 1 row

    Hi,

    I want to do the following,

    I have in column 1 the generic name of a medication, in column 2 I have the brand name. In column 3 I have the side effects of the medication.

    From a seperate sheet I want to be able to type either the generic or brand name in to get the side effect information to display in the adjacent cell.

    Thank you in advance.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Lookup value from either of 2 columns and return value in column 3 all on 1 row

    Is the generic or brand name in the same cell on second sheet?

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

    Re: Lookup value from either of 2 columns and return value in column 3 all on 1 row

    Sounds like you want to do a VLOOKUP.

    See this...

    http://contextures.com/xlFunctions02.html
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    07-28-2016
    Location
    Sydney, Australia
    MS-Off Ver
    Excel for Mac 2011
    Posts
    10

    Re: Lookup value from either of 2 columns and return value in column 3 all on 1 row

    Hey,

    I want to be able to enter the generic or brand name into the same cell and from that cell look up an array on a different sheet that has in column 1 the generic name column 2 the brand name and return the side effect info from column 3 to the cell next to the cell I entered the search data on the origional sheet.

    Cheers

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Lookup value from either of 2 columns and return value in column 3 all on 1 row

    Assuming "search" value is in A2 of Sheet2

    in B2

    =IFERROR(VLOOKUP($A2,Sheet1!$A$2:$C$200,3,0),VLOOKUP($A2,Sheet1!$B$2:$C$200,2,0))

    to get value of Side effects

  6. #6
    Registered User
    Join Date
    07-28-2016
    Location
    Sydney, Australia
    MS-Off Ver
    Excel for Mac 2011
    Posts
    10

    Re: Lookup value from either of 2 columns and return value in column 3 all on 1 row

    Cheers thank you very much

+ 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] Lookup value for occurrence in 5 columns and return value from 6th column in the same row.
    By irishprince in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-06-2015, 09:50 AM
  2. Lookup against two columns to return value from another column on same sheet
    By batchjb69 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-27-2014, 07:21 PM
  3. Replies: 3
    Last Post: 04-08-2014, 03:11 AM
  4. Replies: 4
    Last Post: 03-13-2013, 12:38 PM
  5. lookup date in column, search columns to right for name, return "x"
    By roothog in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-22-2012, 03:27 AM
  6. Lookup 2 columns and return value based on another 2 columns
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2012, 11:16 AM
  7. Lookup columns, return value IF
    By magman1984 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-08-2011, 10:07 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