Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To all,
I am trying to sum cells that have a specific color. Here is what I have so far: Function SumByColor(InRange As Range, WhatColorIndex As Integer) Dim Rng As Range Dim OK As Boolean Application.Volatile True For Each Rng In InRange.Cells OK = (Rng.Font.ColorIndex = WhatColorIndex) If OK And IsNumeric(Rng.Value) Then SumByColor = SumByColor + Rng.Value End If Next Rng End Function ****Thank you Chip**** When I attempt to use this, I get an error "#NAME?" Any ideas on what is going wrong? Thanks. -- RAYMOND KELLY |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to replace the background color of all cells from light green to light blue? | Excel Discussion (Misc queries) | |||
Summing Cells by Color | Excel Discussion (Misc queries) | |||
Cells won't change font color or show hi-lighted cells in document | Excel Discussion (Misc queries) | |||
Setting of input cells as blue font and formula cells as black fon | Excel Discussion (Misc queries) | |||
Color Cells Summing | Excel Worksheet Functions |