Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counting Cells with colors
Is there a formula that will count cells that contain different colors. Blank
with no data just colored. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counting Cells with colors
Which version of Excel do you have?
"JimW" wrote: Is there a formula that will count cells that contain different colors. Blank with no data just colored. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counting Cells with colors
2003
"Sean Timmons" wrote: Which version of Excel do you have? "JimW" wrote: Is there a formula that will count cells that contain different colors. Blank with no data just colored. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counting Cells with colors
There might also be text in the cell but I want to count it based strictly on
the color "Sean Timmons" wrote: Which version of Excel do you have? "JimW" wrote: Is there a formula that will count cells that contain different colors. Blank with no data just colored. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counting Cells with colors
There is no built in function in Excel to do that, but there is a macro you
can use. If you want it, you can do a search in the search for box with count color. "JimW" wrote: There might also be text in the cell but I want to count it based strictly on the color "Sean Timmons" wrote: Which version of Excel do you have? "JimW" wrote: Is there a formula that will count cells that contain different colors. Blank with no data just colored. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counting Cells with colors
Or, you can buy "Colored Cells Assistant" only 29.95. I was hoping there was
another way. "Sean Timmons" wrote: There is no built in function in Excel to do that, but there is a macro you can use. If you want it, you can do a search in the search for box with count color. "JimW" wrote: There might also be text in the cell but I want to count it based strictly on the color "Sean Timmons" wrote: Which version of Excel do you have? "JimW" wrote: Is there a formula that will count cells that contain different colors. Blank with no data just colored. |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counting Cells with colors
I don't think you can do that with a formula. Here is some code that may be
tweeked to suit. Sub ColorCount() 'Counts the number of colored 'cells in a range named Data. Dim Blue5 As Integer Dim Red3 As Integer Dim Green4 As Integer Dim Yellow6 As Integer Dim Cell As Range For Each Cell In Range("Data") '("B1:F11") If Cell.Interior.ColorIndex = 5 Then Blue5 = Blue5 + 1 ElseIf Cell.Interior.ColorIndex = 3 Then Red3 = Red3 + 1 ElseIf Cell.Interior.ColorIndex = 4 Then Green4 = Green4 + 1 ElseIf Cell.Interior.ColorIndex = 6 Then Yellow6 = Yellow6 + 1 End If Next Range("A1").Value = Blue5 & " Blue" Range("A2").Value = Red3 & " Red" Range("A3").Value = Green4 & " Green" Range("A4").Value = Yellow6 & " Yellow" MsgBox " You have: " & vbCr _ & vbCr & " Blue " & Blue5 _ & vbCr & " Red " & Red3 _ & vbCr & " Green " & Green4 _ & vbCr & " Yellow " & Yellow6, _ vbOKOnly, "CountColor" End Sub HTH Regards, Howard "JimW" wrote in message ... Is there a formula that will count cells that contain different colors. Blank with no data just colored. |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counting Cells with colors
I have lots of code, including a count by color function, at
www.cpearson.com/Excel/Colors.aspx Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Mon, 31 Aug 2009 12:56:02 -0700, JimW wrote: Is there a formula that will count cells that contain different colors. Blank with no data just colored. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting Colors on a worksheet | Excel Worksheet Functions | |||
Sum Cells with colors | Excel Worksheet Functions | |||
Counting colors | Excel Discussion (Misc queries) | |||
2 cells 2 colors | Excel Discussion (Misc queries) | |||
Sum cells in different colors | Excel Discussion (Misc queries) |