+ Reply to Thread
Results 1 to 10 of 10

Top Selling Products - ranking product name error

  1. #1
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Top Selling Products - ranking product name error

    I am trying to rank a list of top selling products by Period and Item Type as follows:

    Top Selling Products.png

    While I am able to get the sales values ranked correctly, the product names shown is including item type not selected.

    Please help! Thank you in advance!

    Joseph
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,224

    Re: Top Selling Products - ranking product name error

    This should do it:

    =LOOKUP(2,1/((Table1[Sales]=H5)*(Table1[Item Type]=$H$2)*(Table1[Period]=$H$1)),Table1[Item Name])

    EDIT: Sorry, doesn't work with multiple values with the same rank.

    Excel 2016 (Windows) 32 bit
    F
    G
    H
    1
    Period
    Jan 2019
    2
    Item Type
    A
    3
    4
    No
    Item Name
    Sales
    5
    1
    Product A3
    10,000.00
    6
    2
    Product A9
    9,000.00
    7
    3
    Product A6
    7,000.00
    8
    4
    Product A6
    7,000.00
    9
    5
    Product A8
    6,000.00
    Sheet: Sheet1
    Last edited by AliGW; 05-23-2020 at 02:16 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,224

    Re: Top Selling Products - ranking product name error

    Try this:

    =@INDEX(Table1[Item Name],AGGREGATE(15,6,(ROW(Table1[Sales])-ROW(Table1[[#Headers],[Sales]]))/((Table1[Sales]=H5)*(Table1[Item Type]=$H$2)*(Table1[Period]=$H$1)),COUNTIF(H$5:H5,H5)))

    Excel 2016 (Windows) 32 bit
    F
    G
    H
    1
    Period
    Jan 2019
    2
    Item Type
    A
    3
    4
    No
    Item Name
    Sales
    5
    1
    Product A3
    10,000.00
    6
    2
    Product A9
    9,000.00
    7
    3
    Product A5
    7,000.00
    8
    4
    Product A6
    7,000.00
    9
    5
    Product A8
    6,000.00
    Sheet: Sheet1

  4. #4
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,784

    Re: Top Selling Products - ranking product name error

    H5=IFERROR(INDEX(Table1[Item Name],SMALL(IF(Table1[Period]=$H$1,IF(Table1[Item Type]=$H$2,IF(Table1[Sales]=$H5,ROW(Table1[Item Name])-ROW($C$2)+1))),COUNTIF($H$5:H5,H5))),"")

    control+shift+enter

    copy down

  5. #5
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Top Selling Products - ranking product name error

    Thank you, AliGW & CARACALLA, both answers work perfectly well! Here's a star for you!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,224

    Re: Top Selling Products - ranking product name error

    Glad to help.

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

  7. #7
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Top Selling Products - ranking product name error

    Sorry, 1 more question: is it possible to select "All" Item Type instead of either A & B?

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,224

    Re: Top Selling Products - ranking product name error

    This is a different question. Please start a new thread with a suitable title and workbook attached. Thanks.

  9. #9
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Top Selling Products - ranking product name error

    Oh.. I thought I can just add in since it's an extension of my original question.

    Ok, will do, thanks AliGW!

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,224

    Re: Top Selling Products - ranking product name error

    No, it isn't - it's a different question altogether! Thanks for complying.

+ 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. Show top selling product DAX
    By martijnvanderveldt in forum Excel General
    Replies: 0
    Last Post: 10-13-2015, 05:09 AM
  2. [SOLVED] Modification on ranking products
    By makinmomb in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 06-08-2014, 12:15 PM
  3. [SOLVED] how to get the Top selling product
    By solty89 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-09-2013, 08:14 AM
  4. [SOLVED] Find the latest selling price from a product list for selected customer
    By wesleyho in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-30-2013, 04:53 AM
  5. Find the best selling product
    By jimmyluk in forum Excel General
    Replies: 3
    Last Post: 07-10-2013, 01:32 PM
  6. Product Pairing for Up-selling
    By tahaahsan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-08-2012, 06:26 PM
  7. 2nd best selling product using Sumproduct
    By theproblem in forum Excel General
    Replies: 5
    Last Post: 11-15-2010, 07:59 AM

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