# Calculating Cells That Qualifiy A Conditional Formatting Rule

#### danikva

##### New Member
 A B C D E 1 21% 20% 2 14% 3 31% 4 7% 5 12%

<tbody>
</tbody>
I'd like to create a formula in cell (E1) that will sum all cells that qualify a conditional formatting rule.

For Example: If the conditional formatting rule says A1>=\$D\$1 (than fill green). This would apply to all cells in column A. In this example cell E1 will show 52% (21%+31%).(unfortunately this page won't let me fill in cells)

What I'm trying to have in cell E1 is the sum of all qualifying cell (green cell) from column A.

As I chose to change the percentage in cell D1, E1 may also change as cells in column A may loss or gain qualifiers. For example if I change D1 from 20% to 10% than cell E1 will change from 52% to 78% (21%+14%+31%+12%).

How can I formulate E1 to sum all color filled cells in column A?

I know I can accomplish what I want in cell E1 by going column B1 and input =if(A1>=\$D\$1,A1,"") and drag the formula down the column and then going to E1 and input = sum(B1:B5). However I want to have E1 calculated by the qualifiers in the conditional format.

#### etaf

##### Well-known Member
use sumif
=SUMIF(A2:A5,">="&D1)

Excel Workbook
ABCDE
1
2ABCDE
321%20%
414%
531%
67%
712%
 Sheet1

#### blaow

##### Board Regular
Why are you insisting on using the conditional formatting?

I would forget the conditional formatting and use:

Code:
``=SUMIF(B2:B6, ">=" &E2)``

#### danikva

##### New Member
use sumif
=SUMIF(A2:A5,">="&D1)

Sheet1

 * A B C D E 1 * * * * * 2 A B C D E 3 21% * * 20% 52% 4 14% * * * * 5 31% * * * * 6 7% * * * * 7 12% * * * *

<colgroup><col style="width: 30px; font-weight: bold;"><col style="width: 64px;"><col style="width: 64px;"><col style="width: 64px;"><col style="width: 64px;"><col style="width: 64px;"></colgroup><tbody>
</tbody>

 Cell Formula E3 =SUMIF(A3:A7,">="&D3)

<tbody>
</tbody>

<tbody>
</tbody>

Excel tables to the web >> Excel Jeanie HTML 4
Thank you, the Sumif formula works beautifully

1,081,560
Messages
5,359,608
Members
400,538
Latest member
leon_oscar

### This Week's Hot Topics

• VBA (Userform)
Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
• List box that changes fill color
Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
• Remove duplicates and retain one. Cross-linked cases
Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
• VBA Copy and Paste With Duplicates
Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
• Macro
is it possible for a macro to run if the active cell value is different to the value above it
• IF DATE and TIME
I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...