Count contents of cells (by color)

sassriverrat

Well-known Member
Joined
Oct 4, 2018
Messages
655
I've been reading the forums but haven't found quite what I want.

I have a column of cells that's a mix of green, red, and white colors. I'd like a way to count the contents of all of the green cells, and preferably it needs to auto update every time a cell changes color....so if a cell suddenly becomes green, the user doesn't have to change anything or reselect anything.

Thanks!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
How exactly is the color of the cells being set/changed?
 
Upvote 0
Cells change color based upon rule that sees if a neighboring cell in the row is equal to "yes, maybe, or no"
 
Upvote 0
Excellent. I was hoping that it was being updated by Conditional Formatting, as this would be very hard to do if it was manual color formatting.
All you need to do is use COUNTIF (or COUNTIFS) formula that use the same conditions as you do in Conditional Formatting to get your counts.
If you are having trouble figuring this out, please post your exact Conditional Formatting rules.
 
Upvote 0
You are welcome.
Glad I was able to help!
:)
 
Upvote 0
Ahhh maybe a bit more help.

Code:
 =Q9="Yes"

Applies:
=$B9:$Q1041

If, say, C9 = 10 and D9 =15, then I want the cell to say that because C9 and D9 are green, the cell equals 25.
 
Upvote 0
OK, if you actually want to SUM the values, and not COUNT the number of colored cells, then you just use the SUMIF or SUMIFS function with those conditions.
 
Upvote 0
Well that's where I've gotten stuck again. If I use name manager with get.cell(38,sheet_reference) then I can get it for cells that I fill, but not those that are filled conditionally....so I get stuck.
 
Upvote 0
Well that's where I've gotten stuck again. If I use name manager with get.cell(38,sheet_reference) then I can get it for cells that I fill, but not those that are filled conditionally....so I get stuck.
I don't quite follow what you mean.
Can you post an example and walk me through it?
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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