Sum if font is red

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.
did you fill the colors manually? or with conditional format? if CF, what are the criteria used?
 
Upvote 0
I'm not looking at fill color. I'm wanting to sum the cells that have red font. The red font is done manually.
 
Upvote 0
For the SumColor code, you would need a slight adjustment to:

=sumcolor(A1:A10,A1:A10,3,TRUE)

=sumcolor(test_range,sum_range,colorindex,[color]oftext)
 
Upvote 0
may be this
Code:
Function sumcolor(ByVal ref As Range)
Dim cl As Range
sumcolor = 0
For Each cl In ref
    If cl.Font.Color = vbRed And IsNumeric(cl) Then sumcolor = sumcolor + cl
Next
End Function
Excel Workbook
ABC
43434
55337
Sheet3
Excel 2003
Cell Formulas
RangeFormula
C5=sumcolor(A4:B5)
 
Upvote 0
For the SumColor code, you would need a slight adjustment to:

=sumcolor(A1:A10,A1:A10,3,TRUE)

=sumcolor(test_range,sum_range,colorindex,[color]oftext)




CURIOUS: I would LOVE this, but when I try it out, I receive #NAME? error - is there something I'm missing? Thanks!!
 
Upvote 0
CURIOUS: I would LOVE this, but when I try it out, I receive #NAME? error - is there something I'm missing? Thanks!!
Did you copy and paste the SumColor VBA code from the link referenced to a standard module in your workbook?
 
Upvote 0

Forum statistics

Threads
1,214,656
Messages
6,120,762
Members
448,991
Latest member
Hanakoro

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