Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Date Calculation & Conditional Formatting

Hi, I am trying to use conditional formatting to color/highlight a cell but
am stumped.

Cell G2 has a date: 18 Jun 08
I need the cell to be colored/highlighted when 1 year has passed. SO, when
the spreadsheet is opened today on 7 Aug 09, the conditional formatting sees
that more than 1 year has passed since the date in cell G2 so teh cell is
highlighted.

How can I do this?

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Date Calculation & Conditional Formatting

1. Select the cell G2
2. From menu FormatConditional Formatting
3. For Condition1Select 'Formula Is' and enter the below formula

=AND(G20,DATE(YEAR(G2)+1,MONTH(G2),DAY(G2))<TODAY ())

4. Click Format ButtonPattern and select your color (say Red)
5. Hit OK

If this post helps click Yes
---------------
Jacob Skaria


"Stumped" wrote:

Hi, I am trying to use conditional formatting to color/highlight a cell but
am stumped.

Cell G2 has a date: 18 Jun 08
I need the cell to be colored/highlighted when 1 year has passed. SO, when
the spreadsheet is opened today on 7 Aug 09, the conditional formatting sees
that more than 1 year has passed since the date in cell G2 so teh cell is
highlighted.

How can I do this?

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Date Calculation & Conditional Formatting

Thanks for the quick and correct answer. I do have a question for you,
however. Inyour formula you have cell G20......is that just to ensure cell
G2 has a value in it? If so, could it also be something like G2 is not null
or whatever that would be?

"Jacob Skaria" wrote:

1. Select the cell G2
2. From menu FormatConditional Formatting
3. For Condition1Select 'Formula Is' and enter the below formula

=AND(G20,DATE(YEAR(G2)+1,MONTH(G2),DAY(G2))<TODAY ())

4. Click Format ButtonPattern and select your color (say Red)
5. Hit OK

If this post helps click Yes
---------------
Jacob Skaria


"Stumped" wrote:

Hi, I am trying to use conditional formatting to color/highlight a cell but
am stumped.

Cell G2 has a date: 18 Jun 08
I need the cell to be colored/highlighted when 1 year has passed. SO, when
the spreadsheet is opened today on 7 Aug 09, the conditional formatting sees
that more than 1 year has passed since the date in cell G2 so teh cell is
highlighted.

How can I do this?

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Date Calculation & Conditional Formatting

you have cell G20......is that just to ensure
cell G2 has a value in it?


Yes. If the cell is empty it will evaluate to 0 and in Excel 0 is less than
today so the cell would be highlighted which you don't want.

could it also be something like G2 is not null
or whatever that would be?


Yes. You could also use G2<"" which means: G2 is not equal to blank. But
G20 takes fewer keystrokes!


--
Biff
Microsoft Excel MVP


"Stumped" wrote in message
...
Thanks for the quick and correct answer. I do have a question for you,
however. Inyour formula you have cell G20......is that just to ensure
cell
G2 has a value in it? If so, could it also be something like G2 is not
null
or whatever that would be?

"Jacob Skaria" wrote:

1. Select the cell G2
2. From menu FormatConditional Formatting
3. For Condition1Select 'Formula Is' and enter the below formula

=AND(G20,DATE(YEAR(G2)+1,MONTH(G2),DAY(G2))<TODAY ())

4. Click Format ButtonPattern and select your color (say Red)
5. Hit OK

If this post helps click Yes
---------------
Jacob Skaria


"Stumped" wrote:

Hi, I am trying to use conditional formatting to color/highlight a cell
but
am stumped.

Cell G2 has a date: 18 Jun 08
I need the cell to be colored/highlighted when 1 year has passed. SO,
when
the spreadsheet is opened today on 7 Aug 09, the conditional formatting
sees
that more than 1 year has passed since the date in cell G2 so teh cell
is
highlighted.

How can I do this?

Thanks




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
conditional formatting for cell date to equal today's date Sistereinstein Excel Worksheet Functions 2 September 10th 12 07:53 PM
conditional formatting a date Neilvass Excel Discussion (Misc queries) 1 December 18th 08 12:49 PM
Date Calculation in Conditional Formatting JPS Excel Worksheet Functions 2 July 23rd 08 08:35 AM
Conditional Formatting Date Humpy New Users to Excel 4 February 25th 06 10:44 AM
Conditional formatting of date cebubum Excel Discussion (Misc queries) 4 June 28th 05 03:27 AM


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