sum values in red cells only

jammoca

Banned
Joined
Nov 6, 2002
Messages
1,100
I have numeric values in cells A1:J30.

Some cells are conditionally formatted to be filled red, some yellow, etc etc etc.

Is there a formula that I can use that will sum only the values found in red-filled cells for a given row.

I believe it can be done by vba code, but I'd prefer to use a formula if at all possible.

If a formula is not possible, can someone please let me know what code might need to be used.

Ta in advance,

Chris
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Summing cells by their interior color isn't very difficult, and there are many sites that have sample code for this.

Summing cells by their conditional formatting color is a bit trickier, but still possible, and again there's code out there.

In Excel 2007+, where you can have more than 3 conditions it gets even more fun.

What you might want to try is to sum the cells based on the conditions that triggered the conditional formatting to begin with.

For example, if A1:A10 turn blue when you type "SOLD" in them, just use SUMIF. If there is additional logic behind the CF, you can make more elaborate tests (SUMIFS, SUMPRODUCT, array formulas, etc.)
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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