Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I just upgraded to excel 2007 but I still can't figure out what I need to do!
I need to come up with a way to count non-blank cells by font color. I have a list of 10 names and I currently have a counta function set to count only the non-blank cells. Now my boss wants to see that number turned into a calculation that counts the number of active names (in this case black font), and ignore the inactive names (gray font). How would I write that to produce anything other than the error message I've become so used to? -- Have a great day! Sincerely, Cassie |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
There is no built-in excel function to do this. But you can use a UDF that
looks at the range and returns the sum of font color. But that function will not recalculate if you change color. Every time you change the color you will need to recalculate or wait excel to recalculate... To install the UDF (User Defined function). From workbook launch VBE using Alt+F11. From menu Insert a Module and paste the below function.Close and get back to workbook and try the below formula. =ColorSum(A1:A10) Function ColorSum(varRange As Range) Dim cell As Range For Each cell In varRange If cell.Text < "" And cell.Font.ColorIndex = 1 Then ColorSum = ColorSum + 1 Next End Function If this post helps click Yes --------------- Jacob Skaria "Cassie" wrote: I just upgraded to excel 2007 but I still can't figure out what I need to do! I need to come up with a way to count non-blank cells by font color. I have a list of 10 names and I currently have a counta function set to count only the non-blank cells. Now my boss wants to see that number turned into a calculation that counts the number of active names (in this case black font), and ignore the inactive names (gray font). How would I write that to produce anything other than the error message I've become so used to? -- Have a great day! Sincerely, Cassie |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Cassie,
What turns the names black or gray? If it is done by formula you can use the result you get to count the instances. If you change them by hand perhaps you can use the column next to the name and place a marker in it, or even drag-copy the name into that column when you go through the names to change their color, then count the names. Seems like a lot of hassle to count 10 names. "Cassie" wrote: I just upgraded to excel 2007 but I still can't figure out what I need to do! I need to come up with a way to count non-blank cells by font color. I have a list of 10 names and I currently have a counta function set to count only the non-blank cells. Now my boss wants to see that number turned into a calculation that counts the number of active names (in this case black font), and ignore the inactive names (gray font). How would I write that to produce anything other than the error message I've become so used to? -- Have a great day! Sincerely, Cassie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I can't change font color in certian cells. | Excel Discussion (Misc queries) | |||
Counting cells with colored font | Excel Worksheet Functions | |||
Cells won't change font color or show hi-lighted cells in document | Excel Discussion (Misc queries) | |||
keeping font color when linking cells | Excel Worksheet Functions | |||
Counting all cells with red font in Excel | Excel Worksheet Functions |