Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default Counting cells by font color

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Counting cells by font color

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 155
Default Counting cells by font color

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
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
I can't change font color in certian cells. bcitygirl Excel Discussion (Misc queries) 2 April 5th 23 01:15 PM
Counting cells with colored font JockW Excel Worksheet Functions 2 May 30th 08 07:44 PM
Cells won't change font color or show hi-lighted cells in document ROBIN Excel Discussion (Misc queries) 1 March 27th 08 09:39 PM
keeping font color when linking cells Jamie Excel Worksheet Functions 1 May 17th 07 10:26 PM
Counting all cells with red font in Excel Zakynthos Excel Worksheet Functions 2 April 25th 07 02:46 PM


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