conditional formatting with dates

V

Vabu3184

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
 
J

John

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 said:
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
 
R

Ron Rosenfeld

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

With the year in A1:

=A1<YEAR(TODAY())


--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top