+ Reply to Thread
Results 1 to 15 of 15

Count and Rank from Data with Category

  1. #1
    Registered User
    Join Date
    04-16-2023
    Location
    Indonesia
    MS-Off Ver
    Microsoft 365 Version 2303
    Posts
    9

    Count and Rank from Data with Category

    Hi there. I'm trying to count the data and rank it for every category on the same table. The data is from the yellow table. Is there a formula to creat a result on column H (blue table) and column M (green table). Specifically to creat the end result like the green table and auto arrange the data based on the rank.
    Here I attach a screenshot and the sample file.
    Appreciate your help.
    Thank you.

    Screenshot 2023-07-05 125337.png
    Example 1.xlsx
    Last edited by darylglennt; 07-05-2023 at 10:52 PM.

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Count and Rank from Data with Category

    I want to create a formula that creates the entire tables at once.
    Can the modes of transport not used by a category be omitted from the tables?

    For example Car and Taxi in Category Childeren.

  3. #3
    Registered User
    Join Date
    04-16-2023
    Location
    Indonesia
    MS-Off Ver
    Microsoft 365 Version 2303
    Posts
    9

    Re: Count and Rank from Data with Category

    Hi HansDouwe
    Yes, its okay. That will do just fine.
    Can you help me with that?

  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Count and Rank from Data with Category

    Count:

    Please remove unnessesary spaces in Column C and try in O4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-16-2023
    Location
    Indonesia
    MS-Off Ver
    Microsoft 365 Version 2303
    Posts
    9

    Re: Count and Rank from Data with Category

    Thank you HansDouwe
    It works.

    But here's another problem:
    I find that the real data is separated by other data in the middle of the Category and Transport column (pict below on yellow table). I tried but the formula didn't work well for such condition.
    And the data is sorted from lowest to highest. I need the data to be sorted from highest to lowest.
    Can the same formula work for this?

    Appreciate your effort. Thank you.
    Attachment 835364Example HD.xlsx

  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
    80,978

    Re: Count and Rank from Data with Category

    How can you suddenly 'find' this? Surely you knew it was there? What is the nature of the data?

    Please try to give us much more realistic sample data at the start in future.
    Last edited by AliGW; 07-05-2023 at 03:20 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.

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Count and Rank from Data with Category

    As in your example, the count table is not sorted by a number.

    In the rank table, the number is sorted descending by number.
    See attached example (fitting in your sheet of post #1)

    Formula rank table: Please try :
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Count and Rank from Data with Category

    I can't access your attachment in post #5 (invalid attachment).
    Please upload your attachment via Go advanced and manage attachments. Instructions, see yellow banner at the top of this page.

  9. #9
    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
    80,978

    Re: Count and Rank from Data with Category

    @Hans - click on the bit that says Example - there are two attachments.

  10. #10
    Registered User
    Join Date
    04-16-2023
    Location
    Indonesia
    MS-Off Ver
    Microsoft 365 Version 2303
    Posts
    9

    Re: Count and Rank from Data with Category

    Hai AliGW
    Sorry, I forgot to include the column data between the two.
    Thank you for reminding me. I will give a more appropriate sample next time.

  11. #11
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Count and Rank from Data with Category

    Count table, new lay out, please try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    For the rank table, please adjust the formula in the same way.
    Attached Files Attached Files

  12. #12
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,369

    Re: Count and Rank from Data with Category

    For count table put on J4 and copied down:

    =SUMPRODUCT(($B$3:$B$21=LOOKUP(2,1/NOT(ISBLANK($H$4:H4));$H$4:H4))*($E$3:$E$21=$I4))

  13. #13
    Registered User
    Join Date
    04-16-2023
    Location
    Indonesia
    MS-Off Ver
    Microsoft 365 Version 2303
    Posts
    9

    Re: Count and Rank from Data with Category

    Thank you HansDouwe

    The formula works great!
    Appreciate your help

    Kind regards,
    darylglennt

  14. #14
    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
    80,978

    Re: Count and Rank from Data with Category

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

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) 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 all those who offered help.

  15. #15
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Count and Rank from Data with Category

    thanks for the feedback and rep . Glad to have 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. Ranking by Category w/o Skipping Rank
    By aoballer008 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-24-2023, 06:21 PM
  2. Replies: 1
    Last Post: 11-24-2020, 10:44 AM
  3. How to count rank by category
    By tigerrr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-20-2020, 11:19 AM
  4. Rank by 2 category by formula instead of filter
    By JaneL in forum Excel General
    Replies: 3
    Last Post: 07-25-2012, 01:08 AM
  5. Rank within a category
    By Caezar in forum Excel General
    Replies: 3
    Last Post: 05-15-2006, 12:20 PM
  6. [SOLVED] Rank within Category
    By Henrik in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-28-2005, 03:06 PM
  7. Rank() based on category
    By Henrik in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-12-2005, 08:47 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