View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
chijanzen chijanzen is offline
external usenet poster
 
Posts: 139
Default Color cell text based on date

Byron:
Try

Dim UserRange As Range, rng As Range
Set UserRange = Range("B2:B10")
For Each rng In UserRange
If IsDate(rng) And rng < Date Then
rng.Font.ColorIndex = 3
End If
Next

--

http://www.vba.com.tw/plog/


"Byron" wrote:

Thanks for the input, but I was actually trying to find a way with VBA to do
it automatically.

Thanks

"Gary''s Student" wrote:

Use conditional formatting:

Format Conditional Formatting... and enter value greater than =TODAY()
and select a distinct format.

Then copy the formatting down the column
--
Gary''s Student


"Byron" wrote:

I need a way to color all dates in a column if the date is later than today.
I can do it using the autofilter, but if there are no late dates, it colors
the whole workbook.

Help.

Byron