Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default I'd like to conditionally format a cell based on today's date

I have a column that contains important dates, and I'd like to say make the
forecolor red if they're 3 months away, blue if their 6 months away, etc...

How do I do this?

  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 8,651
Default I'd like to conditionally format a cell based on today's date

Look up "conditional formatting" in Excel help.
--
David Biddulph

"0to60" wrote in message
...
I have a column that contains important dates, and I'd like to say make the
forecolor red if they're 3 months away, blue if their 6 months away, etc...

How do I do this?



  #3   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default I'd like to conditionally format a cell based on today's date

On Aug 20, 2:32*pm, "0to60" wrote:
I have a column that contains important dates, and I'd like to say make the
forecolor red if they're 3 months away, blue if their 6 months away, etc....

How do I do this?


This will set it up for you:

Sub SetUpConditions()

Range("B2").Select
With Range("B2")
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$B$2=INT(NOW())+180"
.FormatConditions(1).Font.ColorIndex = 2
.FormatConditions(1).Interior.ColorIndex = 5
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$B$2=INT(NOW())+90"
.FormatConditions(2).Font.ColorIndex = 2
.FormatConditions(2).Interior.ColorIndex = 3
End With

End Sub

Then have a look at Format - Conditonal Formatting to tweak it. Hope
this helps.
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
how can I conditionally format a cell based on the value in a diff aquigley Excel Discussion (Misc queries) 15 August 21st 08 10:21 PM
Conditional Formatting based on Today's Date MCouture Excel Discussion (Misc queries) 3 May 20th 08 02:46 PM
multiple If's based on today's date dballou Excel Worksheet Functions 5 March 24th 08 03:28 PM
Can I conditionally format a line based on a cell value eoinp Excel Discussion (Misc queries) 4 March 7th 08 10:10 PM
how do you conditional format based upon today's date? valoriegill Excel Worksheet Functions 1 August 22nd 06 12:46 AM


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