#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PAL PAL is offline
external usenet poster
 
Posts: 200
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combination Graph with current year and prior year sales JanW Charts and Charting in Excel 2 April 5th 07 09:20 PM
how to calculate $1000/year at 5% for 25 years showing each year HELP! Setting up and Configuration of Excel 0 July 25th 06 12:58 AM
change the year in a calendar template to different year George Excel Discussion (Misc queries) 1 July 19th 06 07:34 PM
trying to get day/month/year froamt while user enters year only RADIOOZ New Users to Excel 3 June 7th 06 05:30 AM
How to compare current year to prior year in bar chart? substring Charts and Charting in Excel 4 May 12th 05 07:04 PM


All times are GMT +1. The time now is 10:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"