Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a spreadsheet where I need to count the number cells with each of
these colors/shades: Yellow, Orange, and Red Thanks, Lynn |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I made a small typo
Function CountColors(Target As Range, CellColor As String) Select Case CellColor Case "Yellow" SearchColor = 6 Case "Red" SearchColor = 3 Case "Orange" SearchColor = 9 End Select CountColors = 0 For Each cell In Target If Range("A1").Interior.ColorIndex = SearchColor Then CountColors = CountColors + 1 End If Next cell End Function "Lynn" wrote: I have a spreadsheet where I need to count the number cells with each of these colors/shades: Yellow, Orange, and Red Thanks, Lynn |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You need a UDF function like the one below
Function CountColors(Target As Range, CellColor As String) Select Case CellColor Case "Yellow" SearchColor = 6 Case "Red" SearchColor = 3 Case "Orange" SearchColor = 9 End Select CountColors = 0 For Each cell In Target If Range("A1").Interior.ColorIndex = SearchColor Then CountColors = CountColors + 1 End If End If End Function "Lynn" wrote: I have a spreadsheet where I need to count the number cells with each of these colors/shades: Yellow, Orange, and Red Thanks, Lynn |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
You'll need a macro/UDF for this. have a look at Chip's site. http://www.cpearson.com/excel/colors.htm Dave url:http://www.ureader.com/msg/104234665.aspx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Any formula to count number of cells with a specific color pattern | Excel Worksheet Functions | |||
How do I count the number of cells highlighted a certain color? | Excel Worksheet Functions | |||
color/shade cell upon input | Excel Discussion (Misc queries) | |||
how to count number of cells in a color ? | Excel Discussion (Misc queries) | |||
HOW TO FORMATE CELLS TO COUNT CELLS WITH A FILL COLOR? | New Users to Excel |