Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I'm trying to add the cells who's font color is red. What I have so far is
=SUMIF(F4:F116," ") Am I close? |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
No. You need a UDF as well as a formula
Add this function Function CellColours(rng As Range) As Variant Dim ary As Variant Dim cell As Range Dim i As Long ReDim ary(1 To rng.Rows.Count) i = 1 For Each cell In rng ary(i) = cell.Font.ColorIndex i = i + 1 Next cell CellColours = ary End Function and then sum like this to sum all red font cells =SUMPRODUCT(--(CellColours(A1:A10)=3) ,A1:A10) and simply count all green font cells like =SUMPRODUCT(--(CellColours(A1:A10)=10)) -- __________________________________ HTH Bob "michelle" wrote in message ... I'm trying to add the cells who's font color is red. What I have so far is =SUMIF(F4:F116," ") Am I close? |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
How did the font color get to be red?
If by Conditional formatting, Excel won't pick up the colorindex of the font. See Chip Pearson's site if that is the case. http://www.cpearson.com/excel/CFColors.htm Gord Dibben MS Excel MVP On Tue, 2 Sep 2008 23:15:01 -0700, michelle wrote: I'm trying to add the cells who's font color is red. What I have so far is =SUMIF(F4:F116," ") Am I close? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding codes based on a font color | Excel Discussion (Misc queries) | |||
Changing Font color based on font type or size | Excel Discussion (Misc queries) | |||
change font color based on a value | Excel Worksheet Functions | |||
How to sum data based on font or cell color? | Excel Worksheet Functions | |||
I can't figure out how to add values based on font color. | Excel Discussion (Misc queries) |