Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
YEAR and IF
I am trying a conditional statement to return "yes" if the date is in 2005.
I have used this =IF(M2=YEAR(2005),"yes","") or =IF(M2=YEAR(AA2),"yes",""). The second statement reference a cell w/ the year. I do not get any field to be "yes" which I know is wrong. Please advise. Eventually I will want to use "OR" which will look for 2005 in multiple columns. Thanks. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
YEAR and IF
If M2 contains a date, I think you need something like this:
=IF(YEAR(M2)=2005,"yes","") Hope this helps. Pete On Jan 9, 2:42*pm, PAL wrote: I am trying a conditional statement to return "yes" if the date is in 2005.. * I have used this =IF(M2=YEAR(2005),"yes","") or =IF(M2=YEAR(AA2),"yes",""). *The second statement reference a cell w/ the year. *I do not get any field to be "yes" which I know is wrong. Please advise. Eventually I will want to use "OR" which will look for 2005 in multiple columns. *Thanks. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
YEAR and IF
Maybe
=IF(YEAR(A1)=2005,"Y","N") Mike "PAL" wrote: I am trying a conditional statement to return "yes" if the date is in 2005. I have used this =IF(M2=YEAR(2005),"yes","") or =IF(M2=YEAR(AA2),"yes",""). The second statement reference a cell w/ the year. I do not get any field to be "yes" which I know is wrong. Please advise. Eventually I will want to use "OR" which will look for 2005 in multiple columns. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combination Graph with current year and prior year sales | Charts and Charting in Excel | |||
how to calculate $1000/year at 5% for 25 years showing each year | Setting up and Configuration of Excel | |||
change the year in a calendar template to different year | Excel Discussion (Misc queries) | |||
trying to get day/month/year froamt while user enters year only | New Users to Excel | |||
How to compare current year to prior year in bar chart? | Charts and Charting in Excel |