Count IF Cell was grey and = 0 - Conditional formatting

Donal28

Well-known Member
Joined
Apr 23, 2010
Messages
527
Hi All

I'm trying to count the number of cells in a range(K9:CB9) which are 0 where the cell is grey, only some of the cells in the range are grey and some are white. I am also using conditional formatting in the range where 1 = green, 2= yellow and 0 = Red so I suppose that means that I want to count the cells that were grey(now red(0) with the conditional formatting). I am using the formula below but it doesn't work. Is the conditional formatting complicating matters here?

=SUMIF(K9:CB9,0,"Gray")

Any help on this would be very much appreciated

Regards

Donal
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
You cannot use the native Excel functions like SUM, SUMIF, or SUMPRODUCT based on formatting options, only cell values.

However, if these colors are based on Conditional Formatting, you should be able to use the same conditions you use for Conditional Formatting for the SUMIF or SUMPRODUCT formulas.
 
Upvote 0

Forum statistics

Threads
1,224,561
Messages
6,179,522
Members
452,923
Latest member
JackiG

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top