+ Reply to Thread
Results 1 to 8 of 8

Second & Third most frequent text with criteria

  1. #1
    Registered User
    Join Date
    07-03-2019
    Location
    Cincinnati, OH
    MS-Off Ver
    Office 365 Subscription
    Posts
    3

    Second & Third most frequent text with criteria

    I have been able to successfully input the most frequently occurring text in a range based on criteria by using an array formula based on the INDEX, MATCH, MODE, and IF functions.

    I also need to find the 2nd most frequent occuring text in a range based on criteria as well as the 3rd most frequent using a variation of the formula but don't know how to go about editing the formula to accomplish this.

    Here is the formula I created to get most frequent state based on ID: =INDEX(State,MODE(IF(ID =D3,MATCH(State,State,0)))) where ID = A2:A22 and State = B2:B22. I am unable to share a screenshot but will add as a table below.
    Attached Images Attached Images

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Second & Third most frequent text with criteria

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. 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 demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Second & Third most frequent text with criteria

    I agree attaching a sample would be more helpful

    I can be done with formulas but they would be complicated and probably need helper columns. the below is just 1 column not 2
    https://www.mrexcel.com/forum/excel-...ues-range.html

    I would pivot the data with ID and state as rows, count of state as the value, and sort by the values descending

    this should be fairly easy to pick from to complete your table, but if you attach a sheet would be quick to do

  4. #4
    Registered User
    Join Date
    07-03-2019
    Location
    Cincinnati, OH
    MS-Off Ver
    Office 365 Subscription
    Posts
    3

    Re: Second & Third most frequent text with criteria

    I believe I have attached the source file. Let me know if you have any issues!
    Attached Files Attached Files

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Second & Third most frequent text with criteria

    Hello TristanPKT. Welcome to the forum and Happy Independence Day!!!

    Try array entering this formula in E3. Fill down and across until you get blanks.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    D
    E
    F
    G
    1
    2
    ID
    #1 State
    #2 State
    #3 State
    3
    A1
    KY
    OH
    IN
    4
    A2
    FL
    GA
    NC
    5
    A3
    NY
    MA
    PA
    6
    A4
    CA
    WA
    OR
    7
    Dave

  6. #6
    Registered User
    Join Date
    07-03-2019
    Location
    Cincinnati, OH
    MS-Off Ver
    Office 365 Subscription
    Posts
    3

    Re: Second & Third most frequent text with criteria

    This worked!! Thanks so much!
    Last edited by AliGW; 07-05-2019 at 03:19 AM. Reason: Please don't quote unnecessarily!

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Second & Third most frequent text with criteria

    You are welcome. Thank you for the feedback and added rep.

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

  8. #8
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Second & Third most frequent text with criteria

    I'm impressed, a bit of exercising the old grey matter to understand it. Will file it away for future use!

+ 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. How to display a most frequent word, based on certain criteria
    By JoeyPeeps in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-05-2016, 02:24 PM
  2. Most Frequent text within a range under specific criteria
    By afronight_76 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-29-2014, 12:16 PM
  3. Determining the most frequent text (1st 2nd and 3rd) in a range in excel...
    By keller101 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-26-2013, 11:43 PM
  4. [SOLVED] Display most frequent text from a list
    By keith6292 in forum Excel General
    Replies: 5
    Last Post: 08-28-2013, 07:41 PM
  5. Replies: 3
    Last Post: 03-20-2012, 09:53 PM
  6. How to sort data by the most frequent text value?
    By Kazabu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-18-2009, 06:27 AM
  7. Most Frequent Text String
    By Bretto75 in forum Excel General
    Replies: 23
    Last Post: 06-01-2009, 12:42 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