Sum only numbers in red font color
not that elegant, but this will work...
1. Built a very easy function that returns the colorindex property of a
particular cell; ie:
Function CellColor(Cellref As String)
CellColor = Range(Cellref).Font.ColorIndex
End Function
2. Beside the column you want evaluated (or elsewhere) use the above
function to return the colorindex of the cell; ie:
A B
10 =CellColor(CELL("address",A1))
20 =CellColor(CELL("address",A2))
30 =CellColor(CELL("address",A3))
3. Use SUMIF to calculate the lot; ie:
=SUMIF(B1:B3,3,A1:A3)
In the above case, the "3" checks for excel's default version of the color
red.
HWH
------
"Cathy Floyd" wrote in message
...
I am looking for a formula to sum only the numbers that
appear in red font color. I tried using this formula: =IF
((font.color=_RGB(255,0,0)),SUM(K5:K25060),0), but it did
not work. Any suggestions?
|