Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I still need an answer to Average cells that have the same fill
color. But only use the cells that have numbers in them. Some may contain words. They are mostly blank. Here is my code so far. Thanks, Jay Function AVGColor(rColor As Range, Range As Range) Dim rCell Dim iCol As Integer Dim C As Range Dim vResult As Double iCol = rColor.Interior.ColorIndex For Each rCell In Range If rCell.Interior.ColorIndex = iCol Then vResult = WorksheetFunction.Sum(rCell, vResult) End If Next rCell For Each C In Range If C.Interior.ColorIndex = rColor.Interior.ColorIndex Then Count = Count + 1 End If Next C If AVGColor = vResult / Count = Numeric Then AVGColor = vResult / Count Else: AVGColor = "" End If End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
trouble with viewing fill color and font color | Excel Worksheet Functions | |||
Sort or sub-total by Fill color or font color | Excel Discussion (Misc queries) | |||
My fill color and font color do not work in Excel Std Edition 2003 | Excel Discussion (Misc queries) | |||
Excel 2003 will not display color fonts or color fill cells | Excel Worksheet Functions | |||
My excel 2003 wont let me fill cells with color or color the tabs. | New Users to Excel |