#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default counting cells?

Hi,
it´s possible, in excel 2003, using a function, counting the number of cells
in a colum that have text in black and text in red charaters.
ex: colum "payment"; (B5:B56); and counting employees in black text, and
employee in red text???
thanks.
alberto

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default counting cells?

Visit www.cpearson.com where Chip has stuff on counting by colour.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"alberto" wrote in message
...
Hi,
it´s possible, in excel 2003, using a function, counting the number of
cells
in a colum that have text in black and text in red charaters.
ex: colum "payment"; (B5:B56); and counting employees in black text, and
employee in red text???
thanks.
alberto



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9,101
Default counting cells?

Yes it is possible but it doesn't automatically get updated. Changing colors
to not produce an event that will update a worksheet. You can use the
functtion below.

call with =countcolors(Range, color)
red = 3 and black = 1, but you can use any color.


Function CountColors(ByVal Target As Range, Color As Integer)

CountColors = 0
For Each cell In Target

If cell.Interior.ColorIndex = Color Then
CountColors = CountColors + 1

End If
Next cell

End Function


"alberto" wrote:

Hi,
it´s possible, in excel 2003, using a function, counting the number of cells
in a colum that have text in black and text in red charaters.
ex: colum "payment"; (B5:B56); and counting employees in black text, and
employee in red text???
thanks.
alberto

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default counting cells?

Thank you.
I really resolve the problem reading that link.
Alberto.


"Bernard Liengme" wrote:

Visit www.cpearson.com where Chip has stuff on counting by colour.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"alberto" wrote in message
...
Hi,
it´s possible, in excel 2003, using a function, counting the number of
cells
in a colum that have text in black and text in red charaters.
ex: colum "payment"; (B5:B56); and counting employees in black text, and
employee in red text???
thanks.
alberto




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default counting cells?

Thank you very much.
I already resolved the problem.
Alberto


"Joel" wrote:

Yes it is possible but it doesn't automatically get updated. Changing colors
to not produce an event that will update a worksheet. You can use the
functtion below.

call with =countcolors(Range, color)
red = 3 and black = 1, but you can use any color.


Function CountColors(ByVal Target As Range, Color As Integer)

CountColors = 0
For Each cell In Target

If cell.Interior.ColorIndex = Color Then
CountColors = CountColors + 1

End If
Next cell

End Function


"alberto" wrote:

Hi,
it´s possible, in excel 2003, using a function, counting the number of cells
in a colum that have text in black and text in red charaters.
ex: colum "payment"; (B5:B56); and counting employees in black text, and
employee in red text???
thanks.
alberto

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
counting cells that are 0 in a range of non-contiguous cells Mark Excel Worksheet Functions 9 March 14th 07 02:45 PM
Query counting cells in a row that exactly match cells in another Marlsnz Excel Discussion (Misc queries) 1 June 2nd 06 07:08 AM
Complicated counting of cells (based on other cells contents) George Excel Worksheet Functions 3 November 7th 05 06:39 PM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 0 April 7th 05 12:47 AM


All times are GMT +1. The time now is 05:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"