+ Reply to Thread
Results 1 to 4 of 4

Google sheets: multiple returns of frequent text

  1. #1
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Google sheets: multiple returns of frequent text

    Hi guys

    i HAVE SIMPLE GOOGLe sheet with data in 1 column

    I am trying to determine the most frequent text and have the value returned. How do I change my formula to return the most frequent text if there is more than 1 FREquent text?

    This is my existing formula: =ARRAYFORMULA(INDEX(B1:B17,MATCH(MAX(COUNTIF(B1:B40,B1:B40)),COUNTIF(B1:B40,B1:B40),0)))

    Regards. Thank you

    https://docs.google.com/spreadsheets...it?usp=sharing

    Ideally i guess it should say, red, yellow
    Last edited by rayted; 11-07-2020 at 11:05 AM.
    Thanks,

    R.



  2. #2
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Google sheets: multiple returns of frequent text

    Most frequent text:

    E1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Next most frequent text even if same number of instances:

    E2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Fill E2 down until it returns #N/A.

  3. #3
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Google sheets: multiple returns of frequent text

    Hi hringv

    thank you, is there a way to have this displayed as "yellow, red" thank you!

  4. #4
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Google sheets: multiple returns of frequent text

    Sorry. I was previously thinking like Excel rather than Google Sheets. This can be done more directly in Google Sheets using its ability to construct arrays.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Deconstructing that, unique(B1:B40) are the distinct items from B1:B40 in order of 1st appearance. countif(B1:B40,unique(B1:B40)) is the number of occurrences of each distinct item. The Google Sheets gem is {countif(B1:B40,unique(B1:B40)),unique(B1:B40)} which is a constructed array the 1st column of which are the number of occurrences of each distinct, and the 2nd column of which are the distinct items. The SORT call sorts that constructed array on its 1st column in descending order. The INDEX call removes the 1st column, leaving only the distinct items in order of most to least occurrences, and TEXTJOIN groups them into a comma-separated list in a single cell.

+ 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. [SOLVED] Indirect error with text join (google sheets)
    By rayted in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 09-19-2020, 04:11 AM
  2. Google Sheets: countifs multiple criteria from multiple sheets
    By wlinksanju in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 10
    Last Post: 06-16-2020, 11:23 PM
  3. Google sheets: Return certain text with exclusion
    By rayted in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-02-2018, 08:04 AM
  4. Google Apps Script for Google Sheets Pulling Formulas from Master to Several Slave Sheets
    By excelroofing in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 08-22-2018, 02:06 AM
  5. [SOLVED] Text and transpose function (google sheets)
    By rayted in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 08-18-2018, 09:03 AM
  6. [Google Sheets ] Using ImportXML returns a wrong value
    By Kimberley in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 11-07-2017, 02:10 PM
  7. Replies: 3
    Last Post: 03-20-2012, 09:53 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