If then syntax

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 

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

Back
Top