Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Color cell text based on date

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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

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
Add values based on text color with the criteria of a date Peter Gonzalez[_2_] Excel Worksheet Functions 7 April 15th 10 08:16 PM
Change Text Color in one cell based upon entry in referenced cell Tee Excel Discussion (Misc queries) 3 September 12th 08 10:07 PM
cell color change based on due date MINAL ZUNKE New Users to Excel 2 June 30th 05 09:24 PM
Changing a cell color based on date entry ... T. Denford Excel Programming 6 April 14th 05 12:16 AM
Change cell color based on date RRP333 Excel Programming 8 March 2nd 05 05:44 AM


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