ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Comparing 2 Dates (https://www.excelbanter.com/excel-worksheet-functions/198913-comparing-2-dates.html)

JWeaver

Comparing 2 Dates
 
Hi All,

I need to compare a date in "Driver's License Expires" column to a specific
date like, 10/31/08, and if the expiration date is less than this date to put
an "X" in a separate column. I want to mark those rows where an employee's
driver's license has expired or will expire by 10/31/08.

I've tried using an IF statement but the results are not correct. It
doesn't appear that the full date is being compared.

Any help would be appreciated!!
--
JWeaver

Gary''s Student

Comparing 2 Dates
 
=IF(A1<DATEVALUE("10/31/2008"),"X","")
--
Gary''s Student - gsnu200800

JWeaver

Comparing 2 Dates
 
I tried your formula but it resulted in a blank cell. The date being
compared to 10/31/2008 is 2/16/2007 and should have resulted in a X in the
cell but it is blank.
--
JWeaver


"Gary''s Student" wrote:

=IF(A1<DATEVALUE("10/31/2008"),"X","")
--
Gary''s Student - gsnu200800


Duke Carey

Comparing 2 Dates
 
Is A1 a real date or is it text?

Format the cell as a date, then press F2 followed by the Enter key and see
what happens

"JWeaver" wrote:

I tried your formula but it resulted in a blank cell. The date being
compared to 10/31/2008 is 2/16/2007 and should have resulted in a X in the
cell but it is blank.
--
JWeaver


"Gary''s Student" wrote:

=IF(A1<DATEVALUE("10/31/2008"),"X","")
--
Gary''s Student - gsnu200800



All times are GMT +1. The time now is 10:47 PM.

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