+ Reply to Thread
Results 1 to 2 of 2

Counting Cells of Specific Colors

  1. #1
    Registered User
    Join Date
    09-26-2021
    Location
    Wichita, KS
    MS-Off Ver
    MS Office Home
    Posts
    1

    Question Counting Cells of Specific Colors

    I need to be able to count cells of a certain color in a couple different contexts. Essentially, I'm working to create a progress tracker of data previously entered into a registry. Much of this data is either inaccurate or missing entirely. I have colored cells that have inaccurate data the standard highlighter yellow color and cells that contain nothing are colored highlighter red. I would like to 1.) count a row if it contains any cell(s) that are colored yellow OR red and 2.) count the total number of yellow and red cells in a given rectangular range.

    I'm fairly certain this is most effectively accomplished using a VBA coded function, however my experience in VBA is very limited and I'm having a hard time piecing together what I can find online to accomplish exactly what I need. In an ideal world, the best answer to this thread would contain 2 different VBA functions for each task with clear direction on what information to insert in a required field

    I have attached a simplified example of what I am working with for clarity. I am happy to answer any questions that you may need answered.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,204

    Re: Counting Cells of Specific Colors

    If you only use these two colors, then perhaps these two functions will suffice.
    Please Login or Register  to view this content.
    You can use them in your code, e.g.
    Please Login or Register  to view this content.
    but you can also call them like a sheet function, e.g.
    Please Login or Register  to view this content.
    Note that simply changing the color of the cell will NOT recalculate the function. You have to force the recalculation of the sheet with the F9 key.

    Artik

+ 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. [SOLVED] Need VB script counting colors of highlighted cells.
    By alexgempesaw in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2015, 11:55 PM
  2. Need VB script counting colors of highlighted cells.
    By alexgempesaw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2015, 05:22 AM
  3. Need VB script counting colors of highlighted cells.
    By alexgempesaw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2015, 05:22 AM
  4. my VBA can't fill in the specific cells with colors
    By kwfine in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-29-2012, 12:01 PM
  5. Excel 2007 : how do you count cells with specific fill colors
    By FluidicAztec in forum Excel General
    Replies: 2
    Last Post: 07-16-2008, 04:51 PM
  6. Adding cells with specific colors
    By spanishjon in forum Excel General
    Replies: 3
    Last Post: 07-25-2005, 05:27 AM
  7. Applying colors to specific cells
    By encounter779 in forum Excel General
    Replies: 3
    Last Post: 02-09-2005, 10:04 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