+ Reply to Thread
Results 1 to 5 of 5

lookup multiple values from 2 different sheets

  1. #1
    Registered User
    Join Date
    04-27-2009
    Location
    Montclair, CA
    MS-Off Ver
    Excel 2003
    Posts
    33

    lookup multiple values from 2 different sheets

    Hi,

    I have data in 2 different sheets but I'm trying to do a vlookup and bring over multiple values from a 2nd sheet. They both have the same PO number.

    For example there are 2 tabs in the attachment: "PO Lines" and "Invoice Lines"
    I'm trying to bring the invoice number from "Invoice Lines" tab to "PO Lines" tab using the "PO Number and Line" as the look up value but there more then 1 invoice number for some of the PO Number.
    Attached Files Attached Files

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

    Re: lookup multiple values from 2 different sheets

    It would help if you showed what you expected to get in some of those Invoice# columns, so I can see if I'm on the right lines. I don't understand why you have some entries of 1 or 2 in column B of the Invoice Lines sheet.

    Pete

  3. #3
    Registered User
    Join Date
    04-27-2009
    Location
    Montclair, CA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: lookup multiple values from 2 different sheets

    ok, sorry I should have save the spreadsheet with the "PO Line" tab showing. 1 or 2 in column B is how the data came out when I exported it so it is part of the PO Number too. Please see the attachment.
    Attached Files Attached Files

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

    Re: lookup multiple values from 2 different sheets

    They seem the same to me, so this is what I've been working on. Put this formula in cell R2 of the Invoices sheet:

    =IF(B2="","-",B2&"_"&COUNTIF(B$2:B2,B2))

    then copy down to the bottom of your data. Then you can put this formula in S2 of the other sheet:

    =IFERROR(INDEX('Invoice Lines'!$O:$O,MATCH($B2&"_"&COLUMNS($S:S),'Invoice Lines'!$R:$R,0)),"")

    and this can be copied across and down to suit.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    04-27-2009
    Location
    Montclair, CA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: lookup multiple values from 2 different sheets

    It works great! Thank you I have been racking my brain on this!

+ 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 across Multiple Sheets using Multiple Criteria
    By kevphanv in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-22-2015, 12:51 PM
  2. [SOLVED] Lookup and sum multiple values based on a single criteria in multiple sheets.
    By paulsanett in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2014, 12:18 PM
  3. Lookup and return multiple matches across multiple sheets
    By somnath6309 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-07-2013, 02:44 AM
  4. Lookup and return multiple matches across multiple sheets
    By somnath6309 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2013, 03:45 PM
  5. lookup one value over multiple sheets & return multiple responses
    By rsagar-patt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-01-2012, 11:30 AM
  6. [SOLVED] Multiple lookup query, AND/IF multiple sheets
    By Christopherdj in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-29-2012, 09:01 PM
  7. Lookup multiple values on multiple sheets
    By RealGomer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2005, 01:05 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