View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John
 
Posts: n/a
Default conditional formatting with dates

The YEAR() function will return the year of a date. So if you use the YEAR()
function on TODAY() it will return the year of today. For example you could
use the following formula:

=IF(E1<YEAR(TODAY()), 1,0)

In the above Formula replace E1 with a the cell that contains the year the
wine is ready to drink. Replace the 1 with whatever you want the function to
return if the ready to drink year turns out to be less then today's year.
Replace 0 with whatever you want the function to return if the ready to
drink year turns out to be the same or greater then today's year.

- John

"Vabu3184" wrote in message
...
I am trying to write a wine spreadsheet and would like to have one column
that indicates the year the wine is ready to drink.

I have entries about using TODAY() to indicate dates before the current
date, however I am struggling to get it to recognise the conditions when
the
entry in the cell is only the year.

Eg. 2005

Can someone please help me with indicating entries where the value (as a
year) is less than the current date?

Thanks


---
avast! Antivirus: Inbound message clean.
Virus Database (VPS): 0612-4, 03/25/2006
Tested on: 3/26/2006 6:50:38 PM
avast! - copyright (c) 1988-2005 ALWIL Software.
http://www.avast.com







---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0612-4, 03/25/2006
Tested on: 3/26/2006 6:56:35 PM
avast! - copyright (c) 1988-2005 ALWIL Software.
http://www.avast.com