Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding cells in a range based on format color
Would anyone like to tell me how it would be possible to add only the cells
that are colored e.g. red through a range Mo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding cells in a range based on format color
Would anyone like to tell me how it would be possible to
add only the cells that are colored e.g. red through a range Function SumRed(Target As Range) As Integer Dim c As Range For Each c In Target If c.Interior.ColorIndex = 3 Then SumRed = SumRed + 1 Next c End Function HTH, Merjet |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding cells in a range based on format color
Mo,
You need to use a VBA procedure to do this. See the SumByColor function at www.cpearson.com/excel/colors.htm . -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Mo" wrote in message ... Would anyone like to tell me how it would be possible to add only the cells that are colored e.g. red through a range Mo |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding cells in a range based on format color
If c.Interior.ColorIndex = 3 Then SumRed = SumRed + 1
That should have been: If c.Interior.ColorIndex = 3 Then SumRed = SumRed + c Merjet |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding cells in a range based on format color
Thanks to Chip & merjet for the help
"Mo" wrote in message ... Would anyone like to tell me how it would be possible to add only the cells that are colored e.g. red through a range Mo |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to Color a Cell Based on a Range of Cells with Colors | Excel Worksheet Functions | |||
color a range of cells based on a criteria | Excel Discussion (Misc queries) | |||
Is there a way to count cells in a range based on fill color? | Excel Worksheet Functions | |||
adding color to cells based on a formula | Excel Worksheet Functions | |||
Adding colour to a range of cells based on one of the cells v... | Excel Discussion (Misc queries) |