+ Reply to Thread
Results 1 to 6 of 6

Determine most used value in excel column

  1. #1
    Registered User
    Join Date
    06-28-2018
    Location
    US
    MS-Off Ver
    2016
    Posts
    89

    Determine most used value in excel column

    I have an excel document where in one column there are 7 different categories that could be in it.
    The categories are "RTW, ACC, HBG, HOM, JWL, SLG, SHO" I am trying to code in a command button a way determine which category is used the most in the column. The excel docs sometimes have hundreds of rows.

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Determine most used value in excel column

    Oldie but a goodie.
    =index(your_range, mode(match(your_range, your_range, 0)))
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Determine most used value in excel column

    Hello and welcome to the forum.

    Here's a formula that returns the most common text in A1:A1000.

    =INDEX(A1:A1000,MODE(MATCH(A1:A1000,A1:A1000,0)))

    Adjust the ranges to suit your data.

  4. #4
    Registered User
    Join Date
    06-28-2018
    Location
    US
    MS-Off Ver
    2016
    Posts
    89

    Re: Determine most used value in excel column

    Hi thank you for the help. I keep getting the error "Compile error: Expected: list separator or )" the error highlighting the colon for the range I entered "H2:H100000000)

  5. #5
    Registered User
    Join Date
    06-28-2018
    Location
    US
    MS-Off Ver
    2016
    Posts
    89

    Re: Determine most used value in excel column

    Hi thank you for the help. I keep getting the error "Compile error: Expected: list separator or )" the error highlighting the colon for the range I entered "H2:H100000000

  6. #6
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Determine most used value in excel column

    There is no such cell as H100000000. Limit it to the size of your data.

+ 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: 1
    Last Post: 03-22-2017, 06:33 PM
  2. Determine the last column
    By shimaa01234 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2015, 12:00 PM
  3. [SOLVED] Dynamic search; using column # result to determine column used for column/row match.
    By David Brunk in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-18-2014, 09:57 PM
  4. Determine largest value in column 2 for index in column 1
    By anakaine in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-19-2013, 11:26 PM
  5. Replies: 2
    Last Post: 01-31-2013, 07:04 PM
  6. [SOLVED] VBA. Determine last column used
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-14-2012, 12:58 PM
  7. [SOLVED] determine which column has a value
    By [email protected] in forum Excel General
    Replies: 6
    Last Post: 10-08-2005, 03:05 AM

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