ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Date in a cell is before or after a date in another cell (https://www.excelbanter.com/excel-discussion-misc-queries/150800-date-cell-before-after-date-another-cell.html)

thea

Date in a cell is before or after a date in another cell
 
I'm trying to compare the date in two cells. The format is mm/dd/yyyy. How
do I have to change the formula below to make the comparison work?

=IF(C1<8/1/2007,F1,0)

Peo Sjoblom

Date in a cell is before or after a date in another cell
 
=IF(C1<--"2007-08-01",F1,0)

or

=IF(C1<DATE(2007,8,1),F1,0)


assuming you meant August 1st and not January 8th

--
Regards,

Peo Sjoblom


"Thea" wrote in message
...
I'm trying to compare the date in two cells. The format is mm/dd/yyyy.
How
do I have to change the formula below to make the comparison work?

=IF(C1<8/1/2007,F1,0)





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

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