ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   conditional formatting with dates (https://www.excelbanter.com/excel-worksheet-functions/79764-conditional-formatting-dates.html)

Vabu3184

conditional formatting with dates
 
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

John

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




Ron Rosenfeld

conditional formatting with dates
 
On Sun, 26 Mar 2006 16:43:02 -0800, Vabu3184
wrote:

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


All times are GMT +1. The time now is 09:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com