YEAR and IF

P

PAL

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.
 
P

Pete_UK

If M2 contains a date, I think you need something like this:

=IF(YEAR(M2)=2005,"yes","")

Hope this helps.

Pete
 

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