+ Reply to Thread
Results 1 to 18 of 18

Top 10 list

  1. #1
    Registered User
    Join Date
    11-08-2017
    Location
    England
    MS-Off Ver
    2013
    Posts
    9

    Top 10 list

    Hi,

    I want to create a top 10 list for each client I report on.

    I have 2 columns I want to report on the first is client and the second is Category. We have 6 clients and I want to do a count of what the most popular categories for each of them are.

    Any help will be appreciated.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,339

    Re: Top 10 list

    Attach a sample workbook (not image).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    11-08-2017
    Location
    England
    MS-Off Ver
    2013
    Posts
    9

    Re: Top 10 list

    attachment included
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,589

    Re: Top 10 list

    Insert a Pivot Table. Add Client and Category to the Row Labels and Category to the Values; it will default to a count. Sort Largest to Smallest.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,589

    Re: Top 10 list

    Oh, and you can add a filter to select the Top 10.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,589

    Re: Top 10 list

    Updated Sample File:
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-08-2017
    Location
    England
    MS-Off Ver
    2013
    Posts
    9

    Re: Top 10 list

    Is there a way to do it without a pivot table?

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,589

    Re: Top 10 list

    Well, you could maybe copy the client and category columns somewhere else and use Remove Duplicates to extract a list of unique combinations. Then you can add a helper column using COUNTIFS. Once you have your totals, you can sort largest to smallest. Not sure how you'd limit it to the Top 10 for each client.

    It of hard work though for little advantage.

    Maybe John will come up with an approach you prefer.

  9. #9
    Registered User
    Join Date
    11-08-2017
    Location
    England
    MS-Off Ver
    2013
    Posts
    9

    Re: Top 10 list

    No problem - thanks. I agree, I think using a pivot table will suffice

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,589

    Re: Top 10 list

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: Top 10 list

    How about this? Happy to explain, if it's OK...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,589

    Re: Top 10 list

    @Glenn: great way to extract the categories. Can't see how that's going to give the Top 10 for each client though. The example data doesn't have lots of clients or categories but I assum the matrix could be much bigger.

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: Top 10 list

    Agreed. Pivot Table is probably the best (even though it pains me to say so... as I don't like them).

  14. #14
    Registered User
    Join Date
    11-08-2017
    Location
    England
    MS-Off Ver
    2013
    Posts
    9

    Re: Top 10 list

    exactly what I want - but (sorry, I should have stated) I need this on a separate tab

  15. #15
    Registered User
    Join Date
    11-08-2017
    Location
    England
    MS-Off Ver
    2013
    Posts
    9

    Re: Top 10 list

    Is there also a way that you can automatically sort it, largest to smallest per client?

  16. #16
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,589

    Re: Top 10 list

    With the Pivot Table, you could leave the Category in the row and move the client to the Column Labels to get something similar. You can choose to put the Pivot Table on a new sheet (the default, I think)

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: Top 10 list

    Here it ison a separate sheet. Sorting will require a different approach. I have an idea....
    Attached Files Attached Files

  18. #18
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: Top 10 list

    Sheet 2, a2, an array formula copied down:

    =IFERROR(INDEX(Sheet1!$I$3:$I$11,MODE(IF(Sheet1!$G$3:$G$11=$A$1,IF(COUNTIF($A$1:A1,Sheet1!$I$3:$I$11)=0,MATCH(Sheet1!$I$3:$I$11,Sheet1!$I$3:$I$11,0)+{0,0})))),"")

    B2, copied down:

    =IF(A2="","",COUNTIFS(Sheet1!G:G,$A$1,Sheet1!I:I,A2))

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files

+ 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: 2
    Last Post: 02-22-2015, 11:40 AM
  2. Replies: 3
    Last Post: 04-22-2014, 03:30 PM
  3. Replies: 1
    Last Post: 11-05-2013, 12:40 AM
  4. Replies: 0
    Last Post: 01-09-2013, 11:44 AM
  5. [SOLVED] Taking a list of tasks and a list of subtasks and creating a new list with groupings
    By kknb0800 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-06-2012, 12:16 PM
  6. Replies: 3
    Last Post: 07-20-2012, 09:52 AM
  7. list 1 has 400 names List 2 has 4000. find manes from list 1 on 2
    By Max in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 05:05 AM

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