![]() |
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 |
=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 |
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 |
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 |
All times are GMT +1. The time now is 12:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com