Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Francisco
 
Posts: n/a
Default how to count number of cells in a color ?

I have a list of data in column, they have conditioanal format to different
colors, e.g. blue, red, brown. I want to count the total number of blue.
How to do it ? The "CountIf" function does seem to help. Any suggestions ?
Thanks.
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Francisco

See
http://www.cpearson.com/excel/CFColors.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Francisco" wrote in message ...
I have a list of data in column, they have conditioanal format to different
colors, e.g. blue, red, brown. I want to count the total number of blue.
How to do it ? The "CountIf" function does seem to help. Any suggestions ?
Thanks.



  #3   Report Post  
paul
 
Posts: n/a
Default

why dont you count/test for the same condition that you use for the
formatting itself.....
--
paul
remove nospam for email addy!



"Francisco" wrote:

I have a list of data in column, they have conditioanal format to different
colors, e.g. blue, red, brown. I want to count the total number of blue.
How to do it ? The "CountIf" function does seem to help. Any suggestions ?
Thanks.

  #4   Report Post  
Jack Sons
 
Posts: n/a
Default

Francisco,

I once found this in the NG, I believe.

Jack Sons
The Netherlands

Sub SumColorCountYellow()
Dim Yellow6 As Integer
Dim Cell As Range

For Each Cell In Range("DataY")
If Cell.Interior.ColorIndex = 6 Then
Yellow6 = Yellow6 + Cell.Value
End If
Next
originalF = Range("F1").Value
Range("F1").Value = "Yellow = " & Yellow6

MsgBox " Yellow adds to " & Yellow6, _
vbOKOnly, "CountColor"

Range("F1").Value = originalF '""
End Sub


"Francisco" schreef in bericht
...
I have a list of data in column, they have conditioanal format to different
colors, e.g. blue, red, brown. I want to count the total number of blue.
How to do it ? The "CountIf" function does seem to help. Any suggestions
?
Thanks.



  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

This works if you used Format|Cells to change the color.

But it won't work with format|Conditional formatting.

Jack Sons wrote:

Francisco,

I once found this in the NG, I believe.

Jack Sons
The Netherlands

Sub SumColorCountYellow()
Dim Yellow6 As Integer
Dim Cell As Range

For Each Cell In Range("DataY")
If Cell.Interior.ColorIndex = 6 Then
Yellow6 = Yellow6 + Cell.Value
End If
Next
originalF = Range("F1").Value
Range("F1").Value = "Yellow = " & Yellow6

MsgBox " Yellow adds to " & Yellow6, _
vbOKOnly, "CountColor"

Range("F1").Value = originalF '""
End Sub

"Francisco" schreef in bericht
...
I have a list of data in column, they have conditioanal format to different
colors, e.g. blue, red, brown. I want to count the total number of blue.
How to do it ? The "CountIf" function does seem to help. Any suggestions
?
Thanks.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 8 May 18th 05 04:23 AM
How do i count the number of conditional formatted cells? kate Excel Discussion (Misc queries) 2 May 16th 05 10:47 PM
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 0 May 15th 05 08:14 PM
How do I count the number of cells in a column in excel that begi. Sherd Excel Discussion (Misc queries) 1 March 8th 05 11:26 AM
Count non-colored cells Ken G Excel Discussion (Misc queries) 3 January 2nd 05 01:42 PM


All times are GMT +1. The time now is 11:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"