+ Reply to Thread
Results 1 to 6 of 6

Most frequent value within the filtered list

  1. #1
    Registered User
    Join Date
    10-01-2014
    Location
    Piatra Neamt
    MS-Off Ver
    365 small business
    Posts
    13

    Most frequent value within the filtered list

    Hello,

    I'm looking for a formula to show me the top 5 (or other top) most frequent text in a FILTERED list and next to it, to show the presence in % of this text in FILTERED list.
    I'm currently using this formula but it only gives the most frequent.

    =INDEX(Table4[SIRE NAME],MODE(IF(SUBTOTAL(3,OFFSET(H2,ROW(Table4[SIRE NAME])-ROW(H2),0)),MATCH(Table4[SIRE NAME],Table4[SIRE NAME],0)*{1,1})))

    Thank you.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Most frequent value within the filtered list

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    10-01-2014
    Location
    Piatra Neamt
    MS-Off Ver
    365 small business
    Posts
    13

    Re: Most frequent value within the filtered list

    Please see attached the example.

    In this example, I sort the list by age (AGE 1) and I find out that DRUMMER is most frequent name (20 times = 30% from 67 "AGE 1" units).
    The second place is for SUHNSTAR and 3rd place for CARLO.
    If we filter by AGE 2 and AGE 3 we will get other values.

    I need, please, a formula to calculate all these automatically.
    Thank you.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Most frequent value within the filtered list

    Is it necessary to do this by formula? My first thought was to use a pivot table. I created a pivot table with Sire name as the row labels, Count of sire name for the values field, and age as the report filter. I click on the Sire name/row labels drop down, select value filters, top 10, where I can choose to return the top 5 count of sire name values. I can filter by age using the age drop down filter.

    Something like this http://www.excel-easy.com/data-analy...ot-tables.html should help if you are unfamiliar with the mechanics of setting up a pivot table.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    10-01-2014
    Location
    Piatra Neamt
    MS-Off Ver
    365 small business
    Posts
    13
    Quote Originally Posted by MrShorty View Post
    Is it necessary to do this by formula? My first thought was to use a pivot table. I created a pivot table with Sire name as the row labels, Count of sire name for the values field, and age as the report filter. I click on the Sire name/row labels drop down, select value filters, top 10, where I can choose to return the top 5 count of sire name values. I can filter by age using the age drop down filter.

    Something like this http://www.excel-easy.com/data-analy...ot-tables.html should help if you are unfamiliar with the mechanics of setting up a pivot table.
    Thank you MrShorty
    It is necessary to use a formula because I constantly add/remove rows from this table. The original table has 12.000 rows and more columns. I also use slices and I want this information to be in real time when I need it on different sheet.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Most frequent value within the filtered list

    Here's a Pivot Table approach.

    If that will work for you just add either a sheet change event macro to the data sheet, or a sheet Activate event to the PT sheet and have the macro refresh the Pivot Table.
    Last edited by Richard Buttrey; 01-31-2017 at 05:51 PM.

+ 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. find most frequent entry in columns from a filtered selection
    By wookietv in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-08-2015, 05:19 PM
  2. [SOLVED] How to find the second most frequent number in a list?
    By Sam in forum Excel General
    Replies: 10
    Last Post: 04-22-2015, 03:17 AM
  3. Replies: 2
    Last Post: 08-01-2012, 01:24 PM
  4. Replies: 3
    Last Post: 03-20-2012, 09:53 PM
  5. How do I extract top 3 most frequent in a list?
    By fuzzyfreak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-17-2008, 07:34 PM
  6. Output the list of frequent data
    By Andy Chan in forum Excel General
    Replies: 3
    Last Post: 12-25-2005, 06:20 PM

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