+ Reply to Thread
Results 1 to 7 of 7

Find most occurring text within a Table column

Hybrid View

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    Midwest, US
    MS-Off Ver
    Excel 2010
    Posts
    26

    Find most occurring text within a Table column

    Hello,

    I have a table that I need to list the most occurring text within a column. I always use the formula below with great results, but I now need this formula to recalculate when I apply filters to my table.
    (My column is named "Company")

    Here is my standard formula that I use for most occurring text:
    PHP Code: 
    =INDEX(A1:A100,MODE(IF(A1:A100<>0,MATCH(A1:A100,A1:A100,0)))) 
    So I changed the cell range to "Table2[Company]" hit Ctrl + Shift + Enter. But unfortunately the formula is not recalculating when I apply filters to the table. It is still finding the most frequent text for the entire column table range.

    Does anyone have any suggestions? I am probably missing something obvious here...


    Thanks!
    -Carl

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Find most occurring text within a Table column

    Hi Carl,

    Did you changed all the 4 ranges in your formula?
    Suggest you to upload the sample file if you still face any issue. thanks.

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Find most occurring text within a Table column

    there's nothing in that formula that will respond to filters. you need something like (untested as I'm on my cell)

    =INDEX(A1:A100,MODE(IF(A1:A100<>0,MATCH(if(subtotal(3,offset(A1:A100,row(a1:a100)-1,0,1)) a1:a100),A1:A100,0)))))
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Find most occurring text within a Table column

    To use table references, try this ARRAY FORMULA, completed by holding down CTRL and SHIFT when you press ENTER (instead of just pressing ENTER)
    =INDEX(Table1[Company],MODE(IF(SUBTOTAL(3,OFFSET(Table1[[#Headers],[Company]],ROW(Table1[Company])-1,)),MATCH(Table1[Company],Table1[Company],0))))
    Is that something you can work with?
    Last edited by Ron Coderre; 12-27-2012 at 02:39 PM. Reason: Removed an extraneous formula segment
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  5. #5
    Registered User
    Join Date
    11-07-2012
    Location
    Midwest, US
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Find most occurring text within a Table column

    Hi Ron,

    This formula gives me a Value Not Available Error.

  6. #6
    Registered User
    Join Date
    11-07-2012
    Location
    Midwest, US
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Find most occurring text within a Table column

    Ron,

    I spoke too soon. I tried it on a different spreadsheet and it works great.

    I still receive an error if my filter creates too small of a list. ?

  7. #7
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Find most occurring text within a Table column

    I only get the error when the filtered list has only one item in it or when no item has more than one instance. I'll see if I can figure out why that happens.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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