Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2002: Formating tab color | Excel Discussion (Misc queries) | |||
Excel 2002: How to keep the new color settings ? | Excel Discussion (Misc queries) | |||
How can I color only subtotal lines in Excel 2002? | Excel Worksheet Functions | |||
Excel 2002 Color Printing | New Users to Excel | |||
Changing color palette for Excel 2002 | Excel Discussion (Misc queries) |