View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Coleman John Coleman is offline
external usenet poster
 
Posts: 274
Default Conditional Computing

Hi,

You can do this in VBA of course (hint: use the worksheet_calculate
event). But - before you go that rout, have you considered using the
conditional sum wizard? It is designed to create conditional sum
formulas using the same sorts of criteria as are used in conditional
formatting. From your problem description, this seems like a good
possibility. It is an add in. Go to tools - add ins and install it if
it isn't already. This may be better than a VBA approach since, for
example, the code might break if you decide you want to use different
colors in the conditional formatting. It would probably also be quicker
if you are talking about a large number of cells.

HTH

-John Coleman

wrote:
Hi,

I am not sure Excel 2003 can do this or not. Here is what I would like
to do.
I have a column (say column A) with some numbers. Some of the cells are
colored green and some are colored red.
I would like to add all the cells colored in red at cell B1 and add all
the cells colored in green at cell C1. The color may be changed
dynamically by means of conditional formatting.

Any idea?

Thanks.