How to Count or Sum cells with Colors

Manny74

Board Regular
Joined
May 6, 2016
Messages
124
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi All,

I have rows 1 thru 21, with data in column B.

How would I count or sum the number of green cells?

I have tried to google this and want to keep this simple, so I'm hoping I don't need to use VBA....

Sorry, I had colors on my spreadsheet, but when I copied it onto the body of my post, the colors (light green) disappeared, so I made the font Arial black (ex. B2, B4, etc.), so you can pretend those are the light green cells I need to count/sum.....


1B
262.09%
3699
475.40%
5 57
60
7 0
8 58
9 88.73%
10 0%
111
1271%
13 33
14 55.49%
15 90.00%
160.00
170.00
181.64
19511
205.01
21708

<tbody>
</tbody>
 
Last edited:

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
If the coloring is done by conditional formatting then you can use the same condition to sum the cells. If they are manual colored the you would need VBA.
 
Upvote 0
How are the cells being coloured?
 
Upvote 0
Well I used conditional formatting for each cell...
The user must meet a certain target for each cell (goal)

So for example, B2 (62.09), if it's equal to or greater than 50% then it would be green....
 
Upvote 0
Yes I used conditional formatting for all the cells.
So how would I used conditional formatting to count the numbers of green cells?
Keep in mind, each cell has a different target amount....
 
Last edited:
Upvote 0
You could use
=COUNTIF(B:B,">50.0%")

Although your description & data don't match
 
Upvote 0
I used conditional formatting.
Every cell represents the users score...I use conditional formatting to see which user met the target goal-score (green) and who did not...
 
Upvote 0
Numbers like 699 and 57 would be greater than 50%, so would also be highlighted.
So, how did those ones NOT get highlighted?
What is your exact Conditional Formatting formula?
Or is the CF rule only being applied on certain rows (and not all of them)?
 
Upvote 0
Yes I used conditional formatting for all the cells.
So how would I used conditional formatting to count the numbers of green cells?
Keep in mind, each cell has a different target amount....

Maybe something like this

A
B
C
D
E
F
1
Values​
Target​
Count​
Sum​
2
62,09%​
50%​
7​
4,4271​
3
699​
1000​
4
75,40%​
60%​
5
57​
1000​
6
0​
1000​
7
0​
1000​
8
58​
1000​
9
88,73%​
50%​
10
0%​
0%​
11
1​
1000​
12
71%​
60%​
13
33​
1000​
14
55,49%​
50%​
15
90,00%​
70%​
16
0​
1000​
17
0​
1000​
18
1,64​
1000​
19
511​
1000​
20
5,01​
1000​
21
708​
1000​

<tbody>
</tbody>


Formula in E2
=SUMPRODUCT(--(B2:B21>=C2:C21))

Formula in F2
=SUMPRODUCT(--(B2:B21>=C2:C21),B2:B21)

M.
 
Upvote 0

Forum statistics

Threads
1,215,561
Messages
6,125,533
Members
449,236
Latest member
Afua

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