Results 1 to 6 of 6

Thread: Get the most recurring value listed in Microsoft Excel

  1. #1
    Join Date
    Feb 2012
    Posts
    11

    Get the most recurring value listed in Microsoft Excel

    I have a column with the values red, amber and green. I want to count the values and in the calculation field, show the value which occurs most frequently. e.g.
    • amber
    • amber
    • red
    • green
    • amber

    The calculation field should return amber.

  2. #2
    Join Date
    Aug 2011
    Posts
    460

    Re: Get the most recurring value listed in Microsoft Excel

    Excel doesn't have a built in way of counting cells by color. You will need to find a proper macro for this. Only then you can get the expected result. You can try searching in the official help forums of Microsoft Excel for more information.

  3. #3
    Join Date
    Aug 2011
    Posts
    564

    Re: Get the most recurring value listed in Microsoft Excel

    I actually have the words in the column as well as them color coding based on conditional formatting, can I do it using the text. There are some sample formula you can try out, they are =COUNTIF(A1:A100,"amber"), =COUNTIF(A1:A100,"red") and =COUNTIF(A1:A100,"green").

  4. #4
    Join Date
    Aug 2011
    Posts
    580

    Re: Get the most recurring value listed in Microsoft Excel

    I don't quite understand your original post - if you just return the largest number, how will you know which color it relates to. You could put "amber", "green" and "red" in cells C1, C2 and C3, then in D1: =COUNTIF(A$1:A$100,C1) and copy this to D2 and D3 to show you all the values (adjust range as necessary). If you really want to you could try: =MAX(COUNTIF(A$1:A$100,"amber"),COUNTIF(A$1:A$100, "red"),COUNTIF(A$1:A $100,"green")). But this will only give you the maximum number.

  5. #5
    Join Date
    Aug 2011
    Posts
    540

    Re: Get the most recurring value listed in Microsoft Excel

    Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just ENTER): =INDEX(rng,MODE(MATCH(rng,rng,0))). There must be a most frequent value for this to work. In other words, if all entries are unique you'll get an error. Also, if there are multiple instances of a mode (multimodal) the first instance will be returned.
    • amber
    • red
    • green
    • blue

    That sample will return #N/A since there is no mode.
    • amber
    • red
    • amber
    • red

    That sample will return amber because it is the first mode.

  6. #6
    Join Date
    Aug 2011
    Posts
    695

    Re: Get the most recurring value listed in Microsoft Excel

    I had the same base question as MMcQ, and used your formula below to solve the first part of the problem. I want the most common occuring text in A1, and the number of times that text occurs in the range in A2. I have the required formula for A2 =COUNTIF(C1:C16,A1), but I don't want the formula in A1 to count or return blanks. For example, for the range below, I want the cell to return the value "RED", not " "
    • C1. AMBER
    • C2. RED
    • C3.
    • C4.
    • C5.
    • C6. RED

    The third part of my problem is that I want another cell to return the SECOND most common text value, so the above range would result in the word "RED" in A1 and "AMBER" in A2 with their corresponding values in B1 and B2.

Similar Threads

  1. Extracting data from Microsoft Project 2010 to Microsoft Excel
    By Lennon Norris in forum Microsoft Project
    Replies: 6
    Last Post: 03-03-2012, 04:35 PM
  2. Excel is only printing half page in Microsoft Excel
    By (Cowherd) in forum MS Office Support
    Replies: 2
    Last Post: 17-02-2012, 04:31 PM
  3. Replies: 6
    Last Post: 17-02-2012, 01:18 PM
  4. Replies: 4
    Last Post: 13-02-2011, 10:37 AM
  5. Replies: 2
    Last Post: 10-03-2009, 10:50 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
  •  
Page generated in 1,750,587,253.59758 seconds with 16 queries