+ Reply to Thread
Results 1 to 14 of 14

Lookup data in different sheets with duplicate data

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    singapore
    MS-Off Ver
    Excel 2003
    Posts
    10

    Lookup data in different sheets with duplicate data

    Hi all,

    I have a list of products (sheet 1) that I need to find the locations for goods picking, the master inventory list (sheet 2) has the same product code but with different location, what function should I use so that my (sheet 1) can view all possible location. Example as follows:

    (sheet 1)
    Product no Location
    123.11
    124.12
    123.23

    (sheet 2)
    Product no Location
    123.11 A01
    123.11 A02
    123.23 B01
    123.23 C01
    123.23 D01
    124.12 F01


    Please help.

    Thank you very much.

  2. #2
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Lookup data in different sheets with duplicate data

    Hi - Welcome to the forum. You could achieve this easily by pivoting your data set.
    If solved kindly remember to mark Thread as solved.
    Click the small star icon at the bottom left of my post if this was useful.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,705

    Re: Lookup data in different sheets with duplicate data

    This is some code for a multi-lookup UDF that I obtained a couple of years back.

    Please Login or Register  to view this content.
    Give it a try.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Lookup data in different sheets with duplicate data

    Also, would be helpful if you could upload a sample workbook.

  5. #5
    Registered User
    Join Date
    11-14-2012
    Location
    singapore
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Lookup data in different sheets with duplicate data

    Hi, any example how I can do it? I mean when I key in the product code, the location can straight away pop up. thanks

  6. #6
    Registered User
    Join Date
    11-14-2012
    Location
    singapore
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Lookup data in different sheets with duplicate data

    Hi, it looks very complicated to me.

  7. #7
    Registered User
    Join Date
    11-14-2012
    Location
    singapore
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Lookup data in different sheets with duplicate data

    This is a sample, I need to find location for picking list using the data in the Master Inv list.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Lookup data in different sheets with duplicate data

    Hi - Did you try the code given by Alan?

    To pivot your data, select the data range and press ALT + D + P.

    If you are using Excel 2003 (per your profile), drage the Product Code filed to the pivot table first and then drag and drop the Location next to Product code column. This will show location for each of your product code in a simple yet organized manner.

    Thanks.

  9. #9
    Registered User
    Join Date
    11-14-2012
    Location
    singapore
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Lookup data in different sheets with duplicate data

    what if i am using excel 2010? i cant understand Alan code

  10. #10
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Lookup data in different sheets with duplicate data

    In 2010, I would pull Product code into the Report Filter section and Location into the Row Label section and play around. In pivot there are several ways to cut the data, so give it a shot.

    Am at work so unable to upload my results - sorry about that.

    Thanks.

  11. #11
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,705

    Re: Lookup data in different sheets with duplicate data

    I've loaded my code into the sheet you attached. It is an User Defined Function and can be called from the Function task bar. Look at the file attached.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    11-14-2012
    Location
    singapore
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Lookup data in different sheets with duplicate data

    Quote Originally Posted by alansidman View Post
    I've loaded my code into the sheet you attached. It is an User Defined Function and can be called from the Function task bar. Look at the file attached.
    Hi Guru,

    Thank you, its the results that I want, but how do I install the UDF? For your kind advice.

    Thank you.

  13. #13
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,705

    Re: Lookup data in different sheets with duplicate data

    Open your spreadsheet. Click on the Alt + F11 key. This opens the VBA window. Click on insert. Insert module. Paste my code in. Close and save the VBA window. In the spreadsheet, click on the Formula fx. Go to User Defined select Multi-vlookup.

    Alan

  14. #14
    Registered User
    Join Date
    11-14-2012
    Location
    singapore
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Lookup data in different sheets with duplicate data

    Quote Originally Posted by alansidman View Post
    Open your spreadsheet. Click on the Alt + F11 key. This opens the VBA window. Click on insert. Insert module. Paste my code in. Close and save the VBA window. In the spreadsheet, click on the Formula fx. Go to User Defined select Multi-vlookup.

    Alan
    Hi Alan,

    Sorry for my knowledge in Excel, I tried to copied your code..( =VLookUpMulti(A2,'Master inv list'!$A$2:$B$11,2,,)) but it didnt seems to work for me... Need your kind advice. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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