#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ST ST is offline
external usenet poster
 
Posts: 14
Default excel 2003

How do I count red dates in a column for a total. I have tried the "get font
color"formular, but it does not work. Do I need some kind of Add-in installed.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default excel 2003

Hi,

you probably need a UDF. Alt +F11 to open VB editir. Right click 'This
workbook' and insert module. paste the code in on the right.

Call it with
=colourdates(A1:A22,3)

3 is Red. If your unsure of a colour number record a macro of yourself
setting a font colour and have a look at the macro. This code won't work if
the colour is a result of a conditional format, that's more complicated

Function ColourDates(Rng As Range, Colour As Integer) As Integer
Dim C As Range
For Each C In Rng
If IsDate(C) Then
If C.Font.ColorIndex = Colour Then
ColourDates = ColourDates + 1
End If
End If
Next
End Function

Mike

"st" wrote:

How do I count red dates in a column for a total. I have tried the "get font
color"formular, but it does not work. Do I need some kind of Add-in installed.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ST ST is offline
external usenet poster
 
Posts: 14
Default excel 2003 Tring to use a formula=getfontcolor((m3:m238),3))



"Steve" wrote:

How do I count red dates in a column for a total. I have tried the "get font
color"formular, but it does not work. Do I need some kind of Add-in installed.
I do not know VBA. But my results are #name. Is it a problem with the syntax?
Is there another formula. I am a complete novice.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default excel 2003 Tring to use a formula=getfontcolor((m3:m238),3))

Unless you have a UDF named getfontcolor then you will have to make one.

See Chip Pearson's site for the cellcolorindex UDF

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

Good idea to download the module with all the functions and copy to your
workbook or Personal.xls

If you just want a count of red cells you can do it without VBA.

Select a range and EditFind

FormatFormatPatterns. Click on red pattern and OK

Find all.

In the "found" dialog box select top address then SHIFT + End to select all.

On Status bar right-click and "Count"


Gord Dibben MS Excel MVP

On Wed, 8 Oct 2008 09:13:07 -0700, st wrote:



"Steve" wrote:

How do I count red dates in a column for a total. I have tried the "get font
color"formular, but it does not work. Do I need some kind of Add-in installed.
I do not know VBA. But my results are #name. Is it a problem with the syntax?
Is there another formula. I am a complete novice.



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
Convert Excel 2003 spreadsheet into Outlook Contacts table 2003 Stuart[_4_] Excel Discussion (Misc queries) 2 October 6th 08 05:07 PM
Copy and paste problem Excel 2003 to Word 2003 [email protected] Excel Discussion (Misc queries) 2 August 28th 07 11:14 AM
import Excel 2003 file into Outlook 2003 - NO NAMED RANGES?? lewisma9 Excel Discussion (Misc queries) 0 February 27th 07 12:23 AM
Copying Excel 2003 Selection into Outlook 2003 HTML E-Mail Message [email protected] Excel Discussion (Misc queries) 0 July 10th 06 03:07 PM
Excel 2003 Database Driver Visual FoxPro 7 on Server 2003. Cindy Winegarden Excel Discussion (Misc queries) 0 November 28th 04 12:07 AM


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