+ Reply to Thread
Results 1 to 8 of 8

Ranking by Percentage of Contribution to Category

  1. #1
    Registered User
    Join Date
    03-28-2012
    Location
    Missouri
    MS-Off Ver
    Excel 2007
    Posts
    30

    Ranking by Percentage of Contribution to Category

    Okay you all were kind enough to help me out yesterday and I appreciate that, so today I want to see if anyone can help with this thought.

    I have a 30,000 line spreadsheet that contains approximately 150 different grocery product categories. I am wanting a formula that will rank each item, within each category, by it's percentage of contribution to the total category units sold. I have attached a simple example of what I am looking for, I hope it makes sense. Please note that the spreadsheet has no breaks that would separate the categories, so the formula will have to be able to know when one category stops and another begins.

    Thanks so much for your help!!
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Ranking by Percentage of Contribution to Category

    Perhaps in D3 and copy down.

    =C3/SUMIF($A$3:$A$25,A3,$C$3:$C$25)

    Format columnD as percentage.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Ranking by Percentage of Contribution to Category

    Column D, Percentages:

    =C3/SUMIF($A$3:$A$25,A3,$C$3:$C$25)

    Column E, Rank by Contribution

    ASCENDING RANKS

    =COUNTIF($A$3:$A$300,A3)-((SUMPRODUCT(($A$3:$A$300=A3)*($D$3:$D$300>D3))+1)+COUNTIFS($D$3:D3,D3,$A$3:$A3,A3)-1)+1 (Array - Ctrl+Shift+Enter)

    or

    =SUMPRODUCT(--(A$3:A$25=A3),--(D3>D$3:D$25))+1


    DESCENDING RANKS

    =COUNTIF($A$3:$A$300,A3)-((SUMPRODUCT(($A$3:$A$300=A3)*($D$3:$D$300<D3))+1)+COUNTIFS($D$3:D3,D3,$A$3:$A3,A3)-1)+1 (Array - Ctrl+Shift+Enter)

    or

    =SUMPRODUCT(--(A$3:A$25=A3),--(D3<D$3:D$25))+1

  4. #4
    Registered User
    Join Date
    03-28-2012
    Location
    Missouri
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Ranking by Percentage of Contribution to Category

    You guy's are awesome!!

    I have tested the formulas on a smaller version of my spreadsheet and they appear to be working perfectly. I will try it on the full spreadsheet later today and let you know the results.

    Thanks again!

  5. #5
    Registered User
    Join Date
    03-28-2012
    Location
    Missouri
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Ranking by Percentage of Contribution to Category

    Okay all appears to be working great. Now I would like to add one more column that shows the Cumulative Sales Percentage. Meaning that I need a formula to add the percentage totals together until it reaches 100. I know how to do the Cumulative formula for one category, but with multiple categories in one spreadsheet I am unclear on what to do.
    I have attached the example.

    Thanks!
    Attached Files Attached Files

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Ranking by Percentage of Contribution to Category

    In E3 and copy down?

    =SUMPRODUCT(($A$3:A3=A3)*($D$3:D3))

  7. #7
    Registered User
    Join Date
    03-28-2012
    Location
    Missouri
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Ranking by Percentage of Contribution to Category

    Perfect!! Thank you!

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Ranking by Percentage of Contribution to Category

    You are welcome and thanks for the feed back.

    As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED,as per Forum Rule #9. Thank you.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Working out staff contribution as a percentage taking into account absences?
    By highland_turkey in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-06-2013, 09:06 PM
  2. Ranking by category
    By bigmurn in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-03-2012, 04:02 PM
  3. Replies: 14
    Last Post: 05-23-2012, 08:09 PM
  4. Percentage Contribution of an Account
    By Azim.Merchant in forum Excel General
    Replies: 3
    Last Post: 05-14-2012, 10:05 AM
  5. Ranking by Category - Part II
    By Ronald Hooper in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-24-2005, 03:10 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