ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Total red Total Blue need help from you (https://www.excelbanter.com/excel-discussion-misc-queries/180010-total-red-total-blue-need-help-you.html)

Marilyn

Total red Total Blue need help from you
 
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


Conan Kelly

Total red Total Blue need help from you
 
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




"Marilyn" wrote in message
...
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





All times are GMT +1. The time now is 04:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com