Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Excel 2002 count color

I would like to count the cells that have a value in font color red and not
count the cells in font color black, how can i achieve this?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Excel 2002 count color


Hi,

have a look here

http://www.cpearson.com/excel/colors.aspx

Mike

"halcyon" wrote:

I would like to count the cells that have a value in font color red and not
count the cells in font color black, how can i achieve this?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Excel 2002 count color

Hi Mike H, thank you so much, I am very simple at this and have tried to copy
and paste but I have no result, if I want to copy the formula or fuction and
apply to excel where do I paste these long winded functions?

"Mike H" wrote:


Hi,

have a look here

http://www.cpearson.com/excel/colors.aspx

Mike

"halcyon" wrote:

I would like to count the cells that have a value in font color red and not
count the cells in font color black, how can i achieve this?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Excel 2002 count color

Hi,

OK, here's a very simple one. Alt+F11 to open VB editor. Right click
'ThisWorkbook' and insert module and paste the code below in.

call with

=countcolour(a1:a12,3)

Set the range to suit your. 3 equals red so change that to count a different
colour


Function countcolour(rng As Range, cindex As Integer) As Long
For Each c In rng
If c.Font.ColorIndex = cindex Then
countcolour = countcolour + 1
End If
Next
End Function

Mike

"halcyon" wrote:

Hi Mike H, thank you so much, I am very simple at this and have tried to copy
and paste but I have no result, if I want to copy the formula or fuction and
apply to excel where do I paste these long winded functions?

"Mike H" wrote:


Hi,

have a look here

http://www.cpearson.com/excel/colors.aspx

Mike

"halcyon" wrote:

I would like to count the cells that have a value in font color red and not
count the cells in font color black, how can i achieve this?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Excel 2002 count color

I should heve mentioned that this doesn't work if the font colour is derived
from a condiitional format.

You can count by conditional format colour but it's not easy. There's a
method on the XLDYNAMIC website but currently it appears to be down

"Mike H" wrote:

Hi,

OK, here's a very simple one. Alt+F11 to open VB editor. Right click
'ThisWorkbook' and insert module and paste the code below in.

call with

=countcolour(a1:a12,3)

Set the range to suit your. 3 equals red so change that to count a different
colour


Function countcolour(rng As Range, cindex As Integer) As Long
For Each c In rng
If c.Font.ColorIndex = cindex Then
countcolour = countcolour + 1
End If
Next
End Function

Mike

"halcyon" wrote:

Hi Mike H, thank you so much, I am very simple at this and have tried to copy
and paste but I have no result, if I want to copy the formula or fuction and
apply to excel where do I paste these long winded functions?

"Mike H" wrote:


Hi,

have a look here

http://www.cpearson.com/excel/colors.aspx

Mike

"halcyon" wrote:

I would like to count the cells that have a value in font color red and not
count the cells in font color black, how can i achieve this?

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
Excel 2002: Formating tab color Mr. Low Excel Discussion (Misc queries) 6 November 8th 08 04:16 PM
Excel 2002: How to keep the new color settings ? Mr. Low Excel Discussion (Misc queries) 6 March 14th 07 01:33 PM
How can I color only subtotal lines in Excel 2002? dfw in NJ Excel Worksheet Functions 4 October 5th 06 03:55 PM
Excel 2002 Color Printing Lee New Users to Excel 2 July 28th 05 03:47 AM
Changing color palette for Excel 2002 Glenn Chung Excel Discussion (Misc queries) 1 May 5th 05 08:22 PM


All times are GMT +1. The time now is 09:12 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"