Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default IF Statement with Dates.

As part of a method to try and create a summary sheet, I have an IF
statement setup to tell me the date period. Currently, it states:
=IF('OC''s'!I35/5/2007,1,0)

Basically state "1" if the date is greater than May 5, 2007. For some
reason, it responds with a "1" anytime there is anything written into
the cell, which is driving me nuts. Also, what would I do if I want to
have it populate a "1" if the date in that cell is between May 5th and
May30th?

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default IF Statement with Dates.

Your 5/5/2007 is being interpreted as 5 divided by 5 divided by 2007,
so almost any date will be greater then the result. Replace it by
DATE(2007,5,5)



On Oct 24, 5:54 pm, "
wrote:
As part of a method to try and create a summary sheet, I have an IF
statement setup to tell me the date period. Currently, it states:
=IF('OC''s'!I35/5/2007,1,0)

Basically state "1" if the date is greater than May 5, 2007. For some
reason, it responds with a "1" anytime there is anything written into
the cell, which is driving me nuts. Also, what would I do if I want to
have it populate a "1" if the date in that cell is between May 5th and
May30th?

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default IF Statement with Dates.

On Oct 24, 11:04 am, Andrew Taylor wrote:
Your 5/5/2007 is being interpreted as 5 divided by 5 divided by 2007,
so almost any date will be greater then the result. Replace it by
DATE(2007,5,5)


Perfect! Thank you very much!


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
IF Statement for Dates Daren Excel Worksheet Functions 12 October 29th 08 08:50 PM
IF Statement Using Dates Jason T. Excel Discussion (Misc queries) 6 June 4th 08 04:37 PM
If statement with dates Vivian H. New Users to Excel 5 September 14th 06 08:27 AM
IF statement with two dates jbormann Excel Discussion (Misc queries) 2 July 18th 06 05:32 PM
If Statement and Dates Toys Excel Worksheet Functions 5 December 21st 05 12:30 PM


All times are GMT +1. The time now is 01:15 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"