Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Stu Stu is offline
external usenet poster
 
Posts: 29
Default Any formula to count number of cells with a specific color pattern

Is there any formula to count the number of cells (and total the numerical
content of those cells) with a specific color pattern?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Any formula to count number of cells with a specific color pattern

Yes see:
http://www.cpearson.com/excel/colors.htm

--
Gary''s Student - gsnu200756


"Stu" wrote:

Is there any formula to count the number of cells (and total the numerical
content of those cells) with a specific color pattern?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Any formula to count number of cells with a specific color pat

This function should give you what you want:
Sub countcolor()
Dim rng As Range
Dim cnt As Long

Set rng = Range("A1:E12")
cnt = 0
For Each cell In rng
If cell.Interior.ColorIndex = 3 Then
cnt = cnt + 1
End If
Next
MsgBox cnt
'or Range("K2").Value = cnt
Range("G1").Value = cnt
End Sub

Notice, it is set up to count the number of cells that are colored red:
cell.Interior.ColorIndex = 3

Look here for other Excel color IDs:
http://www.geocities.com/davemcritchie/excel/colors.htm


Regards,
Ryan---

--
RyGuy


"Gary''s Student" wrote:

Yes see:
http://www.cpearson.com/excel/colors.htm

--
Gary''s Student - gsnu200756


"Stu" wrote:

Is there any formula to count the number of cells (and total the numerical
content of those cells) with a specific color pattern?

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
Is it possible to count specific words in a number of cells? theboytree Excel Discussion (Misc queries) 1 June 15th 06 09:29 AM
how to count cells with specific format (background color)? Blackheartedowl Excel Discussion (Misc queries) 1 February 8th 06 09:21 AM
How can I count cells of a specific colour (pattern)? Nick@Durham Excel Worksheet Functions 1 November 29th 05 11:18 AM
how to count number of cells in a color ? Francisco Excel Discussion (Misc queries) 4 September 25th 05 01:09 PM
how 2 Count number of cells that have specific condition format? daveydavey Excel Worksheet Functions 2 May 4th 05 02:06 PM


All times are GMT +1. The time now is 05:34 PM.

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"