background color count

cmccabe

Active Member
Joined
Feb 20, 2008
Messages
396
I am using the following formula and getting a #NAME returned

I just need the count of the red background color cells.

Code:
=SUMPRODUCT(--(ExtCell("backgroundcolor",$E$2:$E$13,1)=3))

where E2:E13 have the values and only the red background (=3) is needed. If the green and yellow background colors where needed what do I set the = to? Thank you.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
ExtCell is UDF (User Defined Function).
For more details see this

For yellow use: =6, for green =10
 
Last edited:
Upvote 0
You can use Conditional Formatting (CF) colors based on the cells values of addition column.
Then just count that aux column values instead of the colors.
For example, values of column D wil be 0 for none color of E cell, 1 for green, 2 for yellow, 3 for red.
Set CF accordingly but count numeric values in aux column D, not the collors:
=COUNTIF(D1:D12,3) returns count of red colors in E
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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