+ Reply to Thread
Results 1 to 5 of 5

Find most frequently occurring text string in in a VISIBLE range of cells

  1. #1
    Registered User
    Join Date
    06-15-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    18

    Find most frequently occurring text string in in a VISIBLE range of cells

    Hi,

    I'm having a lot of trouble finding a solution for something that seems quite simple and this forum has proved invaluable in the past.

    I need to find text string that occurs most frequently within the visible cells of a filtered column.

    I also need to be able to do it with a single formula (as opposed to using helper cells, dragging formulas down or using pivot tables).

    Thanks in advance.

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Find most frequently occurring text string in in a VISIBLE range of cells

    Hi,

    Are you able to be a bit more specific about your actual requirements? The information you've given is vague, to say the least. Perhaps an attachment with some examples and your desired results would help?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    06-15-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Find most frequently occurring text string in in a VISIBLE range of cells

    The actual workbook is huge so I have just mocked up a quick example.

    I would like cell A2 to display "6C" (the most frequently occurring of the visible values) as opposed to "4C" which would be the most frequently occurring if it wasn't filtered out.

    Thanks

    EXAMPLE.xls

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Find most frequently occurring text string in in a VISIBLE range of cells

    Hi,

    I noticed in the attachment that your list was not actually filtered, but contained hidden rows, which requires a slightly different formula. If it is filtered cells, and not hidden, that you require, change the first parameter in the SUBTOTAL function below from 103 to 3.

    I had to create a Defined Name to overcome the formula nesting limitations in Excel 2003. So, first of all, go to Name Manager and define a new name, say Array1, with the following formula:

    =SUBTOTAL(103,OFFSET(Sheet1!$A$3:$A$49,ROW(Sheet1!$A$3:$A$49)-ROW(Sheet1!$A$3),,1,))

    (Note: this formula, and the next, are based on the range you gave in the attached - obviously amend to suit your actual requirements.)

    Exit Name Manager and then enter this array formula (make sure you know how to enter these in Excel - they are NOT the same as regular formulas) in some cell:

    =INDEX($A$3:$A$49,MATCH(MAX(MMULT(TRANSPOSE(ROW($A$3:$A$49)^0),--(IF(Array1,$A$3:$A$49,0)=TRANSPOSE(IF(Array1,$A$3:$A$49))))),MMULT(TRANSPOSE(ROW($A$3:$A$49)^0),--(IF(Array1,$A$3:$A$49,0)=TRANSPOSE(IF(Array1,$A$3:$A$49)))),0))

    Regards

  5. #5
    Registered User
    Join Date
    06-15-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Find most frequently occurring text string in in a VISIBLE range of cells

    Thanks for your help.

    Unfortunately using names causes the file to freeze (maybe because the file is so big).

    This is the "inelegant" way I solved the problem in the end:


    =INDEX(EL3:EL10000,MODE(IF($FA3:$FA10000="Visible",MATCH(EL3:EL10000,EL3:EL10000,0))))

    Where EL is the column containing the values and FA is a helper column that contains the texy "visible" if the corresponding row is actually visible.

+ 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: 13
    Last Post: 09-29-2015, 11:22 AM
  2. Return most frequently occurring text in row
    By penfold in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-13-2011, 12:38 PM
  3. Count and identify most frequently occurring words
    By SueWithQuestion in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-24-2011, 01:25 PM
  4. Most frequently occurring text
    By Deanomcbeano in forum Excel General
    Replies: 4
    Last Post: 08-12-2009, 08:58 AM
  5. most frequently occurring value
    By Pivotrend in forum Excel General
    Replies: 3
    Last Post: 12-23-2005, 08:10 AM

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