+ Reply to Thread
Results 1 to 10 of 10

Return the top 3 products using lookup formula

  1. #1
    Registered User
    Join Date
    10-13-2015
    Location
    Auckland
    MS-Off Ver
    2013
    Posts
    12

    Return the top 3 products using lookup formula

    I have a long spreadsheet with the cities and the top 3 products already sorted:
    City Top 3 products
    Madras BL 25ml
    Madras FC 50 ml
    Madras EO 25ml
    Toronto BB
    Toronto NC
    Toronto Lip balm
    Singapore Shampoo
    Singapore Conditioner
    Singapore Lipstick
    Rio Hand cream
    Rio Nail polish
    Rio Frying pan

    In another tab, I want to vlookup the city (from the dropdown list) and get the top 3 products. How do I do that. Vlookup only returns the top value and Index & match haven't worked for me. Maybe I am missing a critical step.
    Last edited by Queenie Balb; 10-17-2015 at 06:47 AM.

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Return the top 3 products using lookup formula

    Hi,

    Welcome to the Forum.

    You would get better help if you attach a sample workbook with enough data to demonstrate your requirement. Make sure your desired results are shown, mock them up manually if necessary. Remember to desensitize the file by removing all confidential information before upload!

    See the following URL for help on how to upload a file.
    http://www.excelforum.com/members/da...ch-a-file.html

  3. #3
    Registered User
    Join Date
    10-13-2015
    Location
    Auckland
    MS-Off Ver
    2013
    Posts
    12

    Re: Return the top 3 products using lookup formula

    File is attached. Thank you!

  4. #4
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Return the top 3 products using lookup formula

    Hi,

    Try the following array formula in B7:

    =INDEX(data!C$1:C$17,SMALL(IF(data!B$1:B$17=$B$3,ROW(data!C$1:C$17)),ROWS(A$1:A1)))

    Please note that this needs to be confirmed by pressing CTRL+SHIFT+ENTER

    drag this down the cells, see the attached file.
    Attached Files Attached Files

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Return the top 3 products using lookup formula

    Or you can also try below formula for avoiding CTRL+SHIFT+ENTER

    B7=INDEX(data!$C$1:$C$17,AGGREGATE(15,6,ROW(data!$B$1:$B$17)/(data!$B$1:$B$17=Display!$B$3),ROW(1:1)))

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,427

    Re: Return the top 3 products using lookup formula

    This is a non-array formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  7. #7
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Return the top 3 products using lookup formula

    Another one. Array Entered

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    TORONTO Exotic oil 60
    Toronto Body butter 89
    Toronto Night cream 89
    Toronto Lip balm 60
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  8. #8
    Registered User
    Join Date
    10-13-2015
    Location
    Auckland
    MS-Off Ver
    2013
    Posts
    12

    Re: Return the top 3 products using lookup formula

    Thank you all. It is solved now!

  9. #9
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Return the top 3 products using lookup formula

    Glad to hear it !!!! please mark as it solved and thanks for feedback by adding rep to us !!!!!

  10. #10
    Registered User
    Join Date
    10-13-2015
    Location
    Auckland
    MS-Off Ver
    2013
    Posts
    12

    Re: Return the top 3 products using lookup formula

    Hi guys,
    I have detected an unforeseen problem. Please open the file MOCK UP JOURNEY PLAN and look at the cells colored in yellow.

    In tab Journey Plan, I need to return the top 5 products in range H19:L23.
    This info is in tab Categ, range Q:U.
    The formula works alright, but when I come to Polynesian spa, it only has 3 products. These 3 products are returned into tab Journey Plan range H19, H20 and H21. However, on H22 and H23, the formula picks up the products from the following Spa (Champs Elisees).
    I need the range H22:H23 to show blank.
    Anyway, I thought this would easy to fix because these fields are driven by cell B1, but I am having trouble with this.
    Can you please help? The file is attached.
    Thanks a lot.
    Attached Files Attached Files
    Last edited by Queenie Balb; 10-20-2015 at 04:17 AM. Reason: clrarifying

+ 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. Replies: 4
    Last Post: 05-19-2015, 08:42 PM
  2. [SOLVED] Return Top 5 Products by Branch using Index and Large
    By Hiuwah in forum Excel General
    Replies: 18
    Last Post: 04-29-2015, 10:55 AM
  3. Replies: 12
    Last Post: 07-23-2014, 01:29 AM
  4. [SOLVED] Return list of products excluding duplicates
    By Chanley24 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-22-2013, 02:21 AM
  5. Formula to work out how many products among various products!
    By MissConfussed in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-02-2013, 02:24 PM
  6. Lookup for products in two columns
    By colbyclay in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-03-2012, 09:12 AM
  7. Xl07 - Lookup products that end in H using the VLOOKUP formula
    By KynaSmith in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-21-2008, 06:24 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