+ Reply to Thread
Results 1 to 7 of 7

Formula for returning most common "word" in a row or column

  1. #1
    Registered User
    Join Date
    04-13-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Thumbs up Formula for returning most common "word" in a row or column

    I'm have a simple spread sheet that includes days and dates. I have a countif formula counting the individual days (as in: Monday = 5, Tuesdays = 2, etc...) I want a formula that returns the most frequent day in text format.
    Last edited by Moshsoft; 04-21-2009 at 04:41 AM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,712

    Re: Formula for returning most common "word" in a row or column

    Let's assume that your days ("Monday", Tuesday" etc. in text format) are in the range B2:B100 then you can use this formula to get the most common directly

    =INDEX(B2:B100,MODE(IF(B2:B100<>"",MATCH(B2:B100,B2:B100,0))))

    confirmed with CTRL + SHIFT +ENTER

    although if there is a tie this will simply return the one that occurs first

    You say you have a count of each day, so if you have each day listed in F2:F8 and the count of each (with COUNTIF formula) in G2:G8 then you can get the most common from that data with this formula

    =INDEX(F2:F8,MATCH(MAX(G2:G8),G2:G8,0))

    again, if there's a tie you'll only get the first one listed....

  3. #3
    Registered User
    Join Date
    04-13-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Formula for returning most common "word" in a row or column

    Excellent,

    I'm using two versions of excel, one at home (2003) and at work, which I believe is XP 2000. Will this work on both?

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,712

    Re: Formula for returning most common "word" in a row or column

    Yes, those are standard functions. Definitely works on 2003 and I'm 99.9% sure it'll work on Excel 2000 also, although I don't have that version so I can't test and give you a definitive "Yes"......

  5. #5
    Registered User
    Join Date
    04-13-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Formula for returning most common "word" in a row or column

    Great, I've tried the =INDEX(B2:B100,MODE(IF(B2:B100<>"",MATCH(B2:B100,B2:B100,0))))
    But so far it's just crashed my Excel..?

    Does it have limitations, is this because the source is b4:b65000..?

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,712

    Re: Formula for returning most common "word" in a row or column

    There's no specific limit for that formula but with that much data I'm not surprised it caused you problems.

    The second approach is much more efficient if you have that much data......

  7. #7
    Registered User
    Join Date
    04-13-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Formula for returning most common "word" in a row or column

    Great, that works great.

    Thank you plenty

+ 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