+ Reply to Thread
Results 1 to 12 of 12

How to lookup multiple items from one tab, multiple rows from another tab then insert

  1. #1
    Registered User
    Join Date
    02-02-2004
    Location
    Michigan USA
    MS-Off Ver
    2010
    Posts
    21

    How to lookup multiple items from one tab, multiple rows from another tab then insert

    I have a speadsheet that I need to do the following:

    Tab One, called NM Parts, has a list of master item number
    Tab Two, called Routings, has a list of item numbers with multiple rows per item number

    I want to be able to create a third tab which will contain all the item numbers from tab one with the multiple rows for the item number from tab two (if found) into tab three.

    Is this possible?
    Attached Files Attached Files

  2. #2
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: How to lookup multiple items from one tab, multiple rows from another tab then insert

    upon a quick review of your Routings tab, you have duplicate values in your ITEM NO column. What happens if one of these duplicate values is on your NM Parts Tab? How do you want this data shown on the third Tab?
    <----- If you are happy with your solution please click on the "* Add Reputation" as a way to say thank you.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: How to lookup multiple items from one tab, multiple rows from another tab then insert

    Hahaha. that had me worried. My formula returned No results. It took a while to discover why. There were NO matching item Nos between the two lists. I added some.

    In A2, coipied across and dnown:

    =IFERROR(INDEX(Routings!A:A,AGGREGATE(15,6,ROW(Routings!$A$2:$A$50)/(ISNUMBER(MATCH(Routings!$A$2:$A$50,'NM Parts'!$A$2:$A$11,0))),ROWS($1:1))),"")
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

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

    Re: How to lookup multiple items from one tab, multiple rows from another tab then insert

    If you have a large data set, use a helper column (Col J) in the routings sheet

    =COUNTIF('NM Parts'!A:A,A2)

    Then in a new sheet pull up the non-zero values

    =IF(ROWS($A$1:$A1)>COUNTIF(Routings!$J$2:$J$1000,">"&0),"",INDEX(Routings!A$2:A$1000,SMALL(INDEX((Routings!$J$2:$J$1000>0)*(ROW(Routings!$J$2:$J$1000)-ROW($J$2)+1),),COUNTIF(Routings!$J$2:$J$1000,"<="&0)+COUNTBLANK(Routings!$J$2:$J$1000)+ROWS($A$1:$A1))))


    Copied down and across
    how-to-lookup-multiple-items-from-one-tab-multiple-rows-from-another-tab-then-insert-routings-t.xlsx
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  5. #5
    Registered User
    Join Date
    02-02-2004
    Location
    Michigan USA
    MS-Off Ver
    2010
    Posts
    21

    Re: How to lookup multiple items from one tab, multiple rows from another tab then insert

    Thank you everyone for all your help. Merry Christmas
    Last edited by patxlb; 12-20-2019 at 12:04 PM.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: How to lookup multiple items from one tab, multiple rows from another tab then insert

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  7. #7
    Registered User
    Join Date
    02-02-2004
    Location
    Michigan USA
    MS-Off Ver
    2010
    Posts
    21

    Re: How to lookup multiple items from one tab, multiple rows from another tab then insert

    I thought I had it but I'm still having problems. I have more parts in the "combined" tab than are in the "NM Parts" tab. Also at least one part is missing.

    I have attached the original file for your review.
    Attached Files Attached Files

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: How to lookup multiple items from one tab, multiple rows from another tab then insert

    Did you actually try my formula? It returns 885 results. the correct number.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-02-2004
    Location
    Michigan USA
    MS-Off Ver
    2010
    Posts
    21

    Re: How to lookup multiple items from one tab, multiple rows from another tab then insert

    Yes, I used your formula and thank you for the assistance. My question is why does the tab "combined" contain parts that were not on the NM Parts tab. One example is located on row 2 (item number 40048700); another is row 6 (item number 40050520)

    Thank you.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: How to lookup multiple items from one tab, multiple rows from another tab then insert

    Neither of them are present on the Combined sheet, if you use my formula. Mind you, it would help if I had attached the correct sheet at my last post.!!!!
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    02-02-2004
    Location
    Michigan USA
    MS-Off Ver
    2010
    Posts
    21

    Red face Re: How to lookup multiple items from one tab, multiple rows from another tab then insert

    Thank you very much. You are a life-saver.

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: How to lookup multiple items from one tab, multiple rows from another tab then insert

    You're welcome and thanks for the rep.

+ 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 multiple items and return in multiple tables
    By ima_ms in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 10-22-2019, 07:31 AM
  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: 1
    Last Post: 09-04-2014, 12:14 PM
  4. Replies: 1
    Last Post: 04-20-2013, 02:45 PM
  5. Replies: 0
    Last Post: 11-08-2012, 01:07 PM
  6. Excel Data Validation - Select Multiple Items - Need to Apply Macro to Multiple Rows
    By kristynroll in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2012, 07:44 PM
  7. How to add multiple items using lookup?
    By Weasel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-13-2008, 06:34 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