Total red Total Blue need help from you

M

Marilyn

Hello
I have conditional formatting =$$AA5="Red" format is highlight in red,
second conditional format is =$$AA5="Blue" format is highlight in blue.
I want to total all the cells in column D,that are highlighted in red and
the result to go in cell N1
then Total all the cells in column D that are highlighted in blue and the
result to go in cell N2
the column range is always A toZ and the total number of rows depends on the
report rows
Can someone , please help me with a macro. Thank so much
 
C

Conan Kelly

Marilyn,

I might be wrong, but I don't think you can count red/blue cells when they
are colored via conditional formatting (even with a UDF). There is probably
some way to count cells that are colored manually, but only with a UDF or
macro/VBA code.

But you should be able to do what you are asking with a formula in XL that
will update automatically when things change. Just count the cells in
column AA that have a value of "Red" or "Blue"

In cell N1, enter this formula:
=Countif(AA5:AA{enter last row of data here}, "Red")

In cell N2:
=Countif(AA5:AA{enter last row of data here}, "Blue")

(make sure to change "{enter last row of data here}")

Just out of curiosity, what is the double dollar signs in your conditional
formatting formula?

HTH,

Conan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top