+ Reply to Thread
Results 1 to 8 of 8

Lookup against two columns to return value from another column on same sheet

  1. #1
    Forum Contributor
    Join Date
    01-16-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    136

    Lookup against two columns to return value from another column on same sheet

    Lookup1.xlsx

    Hi

    I have a data download from a system that is not very well designed and I cannot change (see attached).

    What I want to do is lookup to see if the value in column A of the output sheet is present in the column A or B of the input sheet if it is I would like it to return the value in column C to Colum B of the output sheet if not return "not present" in column B of the output sheet.

    JB

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Lookup against two columns to return value from another column on same sheet

    Hi batchjb69,

    here is one option for you:

    Please Login or Register  to view this content.
    Hope it helps,

    berlan

  3. #3
    Forum Contributor
    Join Date
    01-16-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    136

    Re: Lookup against two columns to return value from another column on same sheet

    Lookup1.xlsm

    Many thanks saved me a load of work

    What about if the value = "not present" it looks up to a third sheet (manual list) and again would return the value in column B. If not in column B it remains "not present"

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Lookup against two columns to return value from another column on same sheet

    No need for VBA for this. Put this in B2 and copy down...
    =IFERROR(IFERROR(VLOOKUP(A2,Input!$A$2:$C$57,3,0),VLOOKUP(A2,Input!$B$2:$C$57,2,0)),"Not Present")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Lookup against two columns to return value from another column on same sheet

    You're welcome, and thanks for the kind feedback

    To also go through a manual list, if the value is not present in the input list, try if this works for you (see attached):
    Please Login or Register  to view this content.
    Best,
    berlan
    Attached Files Attached Files

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Lookup against two columns to return value from another column on same sheet

    Berlan, thanks for the feedback But I think you clicked the negative rep lol...no biggie though

  7. #7
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Lookup against two columns to return value from another column on same sheet

    FDibbins, apologies! Realised it when I had pressed the button and it gave me a different response. Was meant to be positive rep added -- nice and simple solution to the problem -- as your other contributions on the forum!

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Lookup against two columns to return value from another column on same sheet

    Its the thought that counts, thanks for the kind words

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Lookup against two columns to return value from another column on same sheet

    Again, thanks for the rep points, that should make things square

+ 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. lookup for a cell value in entire sheet and return value from a column
    By atulkumar.goel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-22-2014, 01:38 PM
  2. [SOLVED] Lookup column in another sheet and return corresponding value
    By dougmorgan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-30-2013, 06:21 AM
  3. Replies: 0
    Last Post: 01-21-2013, 10:31 AM
  4. 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
  5. Two Columns must match in sheet one and sheet two then lookup column C
    By Pavan Kumar in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-18-2011, 11:32 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