Bookmark and Share

Enter your email address:

Delivered by FeedBurner



Home Page













Subscribe here
Add to My Yahoo!
This page is powered by Blogger. Isn't yours?

Host your Web site with PureHost!


eXTReMe Tracker
  Web http://www.klippert.com



  Monday, June 01, 2009 – Permalink –

Count the Colors

I bid 3 Red



What if you would like to know the color name or to count or to sum cells by a fill color? There is no built-in function in Excel.

In this case you can make a User Defined Function (UDF).

Here is the sample UDF that you can use to analyze, count and sum the cells depending on their filled color.

These UDF function can be used in the same way as built-in functions that you can use in the worksheet.

  • AnalyzeColor Returns the color name, the color index or color index in RGB.
    Syntax: AnalyzeColor(color range, optional; "text" or "index" or "rgb". When it is omitted "text" is used.)


  • CountColor Counts the number of cells depending on their filled color.
    Syntax: CountColor(color range, target range)


  • SumColor Adds all the numbers in a range of cells depending on their filled color.
    Syntax: SumColor(color range, target range)
Sum and Count by fill color

Chip Pearson:
Working with Cell Colors


[Edited entry from 4/11/2006]


See all Topics

Labels:


<Doug Klippert@ 3:13 AM

Comments: Post a Comment

Links to this post:

Create a Link