#1   Report Post  
RL
 
Posts: n/a
Default If then syntax

I want to use the If then function to have it look at a cell and if the date
in the cell is between the beginning and end of the current Fiscal year,
enter a 1 in my cell. My logic was, IF (test cell) =Date(2004,10,1) and
<=Date(2005,9,30),1,0). I seem to do just fine with the first half, but as
soon as I add the "and" I end up getting an invalid. Can someone tell me
the proper syntax for meeting two conditions?

Thanks
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

=IF(AND(A1=DATE(2004,10,1),A1<=DATE(2005,9,30)),1 ,0)

Or

=(A1=DATE(2004,10,1))*(A1<=DATE(2005,9,30))

HTH
Jason
Atlanta, GA

"RL" wrote:

I want to use the If then function to have it look at a cell and if the date
in the cell is between the beginning and end of the current Fiscal year,
enter a 1 in my cell. My logic was, IF (test cell) =Date(2004,10,1) and
<=Date(2005,9,30),1,0). I seem to do just fine with the first half, but as
soon as I add the "and" I end up getting an invalid. Can someone tell me
the proper syntax for meeting two conditions?

Thanks

  #3   Report Post  
bj
 
Posts: n/a
Default

try
=IF(and((test cell) =Date(2004,10,1),
<=Date(2005,9,30)),1,0)


"RL" wrote:

I want to use the If then function to have it look at a cell and if the date
in the cell is between the beginning and end of the current Fiscal year,
enter a 1 in my cell. My logic was, IF (test cell) =Date(2004,10,1) and
<=Date(2005,9,30),1,0). I seem to do just fine with the first half, but as
soon as I add the "and" I end up getting an invalid. Can someone tell me
the proper syntax for meeting two conditions?

Thanks

  #4   Report Post  
Joseph
 
Posts: n/a
Default


Try using this formula

=IF(A2=DATE(2005,1,1),IF(A2<=DATE(2005,4,1),1,0))

Where A2 has the Date that you want. Let me know how it goes.

Cheers


--
Joseph
------------------------------------------------------------------------
Joseph's Profile: http://www.msusenet.com/member.php?userid=2505
View this thread: http://www.msusenet.com/t-1870448372

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
Delete Row syntax conundrum username Excel Discussion (Misc queries) 5 May 24th 05 05:36 PM
syntax question - cell references in VB code needyourhelp New Users to Excel 1 March 2nd 05 08:52 PM
WHAT SYNTAX IS USED TO ROUND A 4-DIGIT NUMBER TO THE NEAREST THOUS KENITOSAN Excel Discussion (Misc queries) 4 February 19th 05 10:06 PM
Vlookup Syntax Error YV New Users to Excel 9 December 23rd 04 05:28 PM
Previous Post - Correct Syntax Query Clarence Crow Excel Worksheet Functions 0 December 7th 04 05:35 AM


All times are GMT +1. The time now is 07:34 PM.

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

About Us

"It's about Microsoft Excel"