ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Logical Test on Date value (https://www.excelbanter.com/excel-discussion-misc-queries/203958-logical-test-date-value.html)

Sheila D

Logical Test on Date value
 
I'm using the IF function and want the logical test to check whether a date
value is greater than another date; I can do this if I store the 2nd date in
another cell but would like to type directly into the formula. I've tried
B301/01/2008 in several different ways and also used the date function as
part of the logical test but it does not return the correct result.

Is there a trick to this or do I have to refer to another cell for dates? No
problem with doing this I just think I should be able to do it 'directly'
Thanks for any help (I'm using 2007 but the same result occurs in 2000)
Sheila

Chip Pearson

Logical Test on Date value
 

Try using the DATE function to convert year, month, and day to an
actual date. E.g.,

=IF(A1DATE(2008,11,23),"A1 is greater","A1 is not greater")


Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
The San Diego Project Group, LLC
(email is on the web site)
USA Central Daylight Time (-5:00 GMT)


On Thu, 25 Sep 2008 10:50:10 -0700, Sheila D
wrote:

I'm using the IF function and want the logical test to check whether a date
value is greater than another date; I can do this if I store the 2nd date in
another cell but would like to type directly into the formula. I've tried
B301/01/2008 in several different ways and also used the date function as
part of the logical test but it does not return the correct result.

Is there a trick to this or do I have to refer to another cell for dates? No
problem with doing this I just think I should be able to do it 'directly'
Thanks for any help (I'm using 2007 but the same result occurs in 2000)
Sheila



All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com