Column B is a list of years (ex: 1998, 2001, 2001, 2010).
In column F, I want to write an if statement that says if the value in column B is less than the current year, then return the value of 1, otherwise return a zero.
I'm stuck.. I know how to do that using Today(), but is there something like that for looking at the current system date and using just the year?
I tried this in F2:
=IF(B2<TODAY(),1,0)
but it returns a 1 when the year 2010 is in column B, and in that case I want the value of 0.
If statement using current year
-
- 3StarLounger
- Posts: 310
- Joined: 19 Apr 2010, 16:18
- Location: middle of the state of Washington
-
- GoldLounger
- Posts: 3081
- Joined: 24 Jan 2010, 19:07
Re: If statement using current year
It's quite late over here, but how about:
=IF(B2<YEAR(TODAY()),1,0)
(Year returns the year corresponding to a date.)
=IF(B2<YEAR(TODAY()),1,0)
(Year returns the year corresponding to a date.)
Byelingual When you speak two languages but start losing vocabulary in both of them.
-
- 3StarLounger
- Posts: 392
- Joined: 25 Jan 2010, 12:21
Re: If statement using current year
=IF(B2<year(TODAY()),1,0)
Steve
Steve
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- 3StarLounger
- Posts: 310
- Joined: 19 Apr 2010, 16:18
- Location: middle of the state of Washington
Re: If statement using current year
That worked perfectly! Thank you.