View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jzzman
 
Posts: n/a
Default How to sum data based on font or cell color?


Thanks for the posting. Funny, I am working on the same thing. I have a
small problem with this. I am using conventional formatting to change
the color of a row based on the contents of a cell. Status column
"completed" = change row shade to green. Now, I am using the UDF below
to sum the green shaded rows. My problem is that even though the
conventional formatting is working for the cells in the row, when you
click on each individual cell, the shading shows no color (even though
you are looking at it and it is GREEN). Because of this, the UDF is not
calculating right. Any thoughts here? I greatly appreciate it.

Jzzman













Max Wrote:
"Roger Govier" wrote:
take a look at Bob Phillip's site for a solution
http://xldynamic.com/source/xld.ColourCounter.html


Just to add on a little to Roger's suggestion ..

Here's a sample file (~ "starter's kit") which
contains an implementation of Bob Phillips' ColorIndex
Function from his "Processing Coloured Cells" page (link above)
and some examples on how to use the UDF in Excel
(kit was given in response to a previous query)

Link to the sample file (construct details inside):
http://www.savefile.com/files/3232462
CountSumCellsByColor_Using_BobPhillips_ColorIndex_ UDF.xls

Note that as the UDF is non volatile, recalc has to be
forced, even if calc mode is set to Automatic. Press
F9 to force recalc. Read the section "Constraints" in
Bob's page.

The sample should help you get started ..

(not sure about font color, though ..)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---



--
jzzman


------------------------------------------------------------------------
jzzman's Profile: http://www.excelforum.com/member.php...o&userid=24838
View this thread: http://www.excelforum.com/showthread...hreadid=544924