Sheet formula to sum by font colour

stuartgb100

Active Member
Joined
May 10, 2015
Messages
287
Office Version
  1. 2021
Platform
  1. Windows
In a numerically formatted column I have numbers in both red and black fonts. How can I sum the column excluding the red values please ? Separately, how can I just sum the red values ? Thanks.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
It makes a difference how the fonts are colored.

If they are colored by Conditional Formatting, you can usually use the same coniditions that you used for Conditional Formatting in a SUMIF, SUMIFS, or SUMPRODUCT formula to get your sum.

If the fonts are colored manually, then you will require VBA, as Excel formulas only work off of values, not formats.
See here for how to do that: How to count or sum cells based on the font colors in Excel?
 
Upvote 0
Solution
It makes a difference how the fonts are colored.

If they are colored by Conditional Formatting, you can usually use the same coniditions that you used for Conditional Formatting in a SUMIF, SUMIFS, or SUMPRODUCT formula to get your sum.

If the fonts are colored manually, then you will require VBA, as Excel formulas only work off of values, not formats.
See here for how to do that: How to count or sum cells based on the font colors in Excel?
Great, many thanks. It'll be VBA for me then.
 
Upvote 0

Forum statistics

Threads
1,215,489
Messages
6,125,093
Members
449,205
Latest member
ralemanygarcia

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