+ Reply to Thread
Results 1 to 6 of 6

Vlookup multiple returns issue with a huge data

  1. #1
    Registered User
    Join Date
    01-09-2018
    Location
    London
    MS-Off Ver
    2010
    Posts
    4

    Vlookup multiple returns issue with a huge data

    Hello all,

    I will add a sample of the data that I am using as it is more that 8K rows.

    So I have a spreadsheet with some codes and products that have been purchased as follows:

    Codes Product
    1 Camera
    1 Phone
    1 Laptop
    2 Screen
    2 Mouse
    2 Laptop
    3 Camera
    3 Laptop
    3 Mouse
    3 Screen

    And another spreadsheet with returns based on the same codes.

    Codes Returns
    1 Phone
    1 Laptop
    2 Mouse
    2 Laptop
    3 Camera
    3 Laptop

    As you can see for example the code 1, returned two of the three products purchased. So I am looking for a formula to see which products are mostly being returned.

    So I made a universal spreedsheet using Vlookup to see the returns based on the codes:

    Codes Product Codes Vlookup Product Returned
    1 Camera 1 Phone
    1 Phone 1 Phone
    1 Laptop 1 Phone
    2 Screen 2 Mouse
    2 Mouse 2 Mouse
    2 Laptop 2 Mouse
    3 Camera 3 Camera
    3 Laptop 3 Camera
    3 Mouse 3 Camera
    3 Screen 3 Camera



    I know that my way of thinking is not correct but can someone help me? I am really stuck.

    Also how can I move to the next product in the Vlookup.

    Please let me know if you have any question/suggestions to make.

    I cannot check that manually..

    Thank you for your time!

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Vlookup multiple returns issue with a huge data

    Why dont you just use the original spreadsheet to indicate whether an item was returned or not?
    Like this:

    in Sheet1!C1
    =IF(MATCH(1,(A1=Sheet2!A$1:A$1000)*(B1=Sheet2!B$1:B1000)),"X","")
    Array formula, use Ctrl-Shift-Enter

    and copy down column C
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    01-09-2018
    Location
    London
    MS-Off Ver
    2010
    Posts
    4

    Re: Vlookup multiple returns issue with a huge data

    Hello Specia-K,

    Thank you for your fast response, but I am not sure if I applied that correctly. I have tried it, however it returns incorrect information. For example the user "1" never bought a Mouse and using this formula it says that he returned a mouse.

    Please find the excel attached here:
    https://drive.google.com/open?id=1Dx...0qWY_aPt_K3HOk

    Thank you,

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Vlookup multiple returns issue with a huge data

    Maybe my formula isnt working properly.

    Now we have a file this works

    in Sales!B2
    =IF(ISNA(MATCH(A2,IF(B2=Returns!B$2:B$1000,Returns!A$2:A$1000),0)),"","X")
    Array formula, use Ctrl-Shift-Enter

    and copy down

  5. #5
    Registered User
    Join Date
    01-09-2018
    Location
    London
    MS-Off Ver
    2010
    Posts
    4

    Re: Vlookup multiple returns issue with a huge data

    Hello Special-K, You just saved the day! You are amazing! May I ask how you know all these? You are awaseme!

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Vlookup multiple returns issue with a huge data

    Thanks.

    That uses an array formula (which I found very difficult to learn at first).
    This forum is a good source of material, it was from here I found out about array formulas and other techniques.

+ 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. Faster way to VLOOKUP huge set of data
    By pareshj in forum Excel General
    Replies: 37
    Last Post: 10-26-2014, 04:52 PM
  2. Vlookup - multiple returns
    By surfsup00 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-23-2014, 12:12 PM
  3. Vlookup with Multiple returns
    By CSMPM in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2013, 04:00 PM
  4. vlookup with multiple row/data returns
    By fun4four in forum Excel General
    Replies: 6
    Last Post: 08-23-2010, 06:21 PM
  5. Multiple Returns with VLOOKUP?
    By hop17 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-18-2009, 08:19 PM
  6. vlookup returns multiple value
    By panproblems in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2008, 03:42 PM
  7. [SOLVED] Vlookup Multiple Returns #REF
    By Ben in forum Excel General
    Replies: 3
    Last Post: 06-28-2005, 04:05 PM

Tags for this Thread

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