View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben
 
Posts: n/a
Default how to use sumbycolor fuction?

Ghauri

Assuming you copied the sumbycolor code from Chip Pearson's site and placed it
in a general module of your workbook.............

http://www.cpearson.com/excel/colors.htm

Assuming your range of cells is A1:X1

In A4 enter =sumbycolor(A1:X1,number)

Where number is the index number of the the background color.

If you don't know the index number, go back to Chip's site and copy the code
for the CellColorIndex Function.

Place it in same module.

In A2 enter =cellcolorindex(A1) drag/copy across to X2

You will get a number for each color to use in your sumbycolor function.


Gord Dibben Excel MVP

On Tue, 29 Nov 2005 09:50:24 -0800, Ghauri
wrote:

In my spread sheet I want to count the values of green, red and blue
background cells separetly, which are in a same row? i.e. I want excel to
only pick green cells and ignore others when counting the values. Does anyone
used this type of fuction before? I was thinking to use sumbycolor function,
but could not work it out.

Please help.............................................. ..................