Date constant in a comparison

Copper Contributor

I need to test in Excel in a cell B1 if the date that is in a cell A1 is younger than 1/1/2018.

How do I type that? =IF(A1>#1-1-2018#;1;0)

Which delimiter should I use for the date? # ?

And may I note the date as 1-1-2018?

Possibly you know the solution?

2 Replies

@Filip_Vandelacluze 

 

You can write it as:

=IF(A1>DATE(2018;1;1);1;0)

or

=IF(A1>43101;1;0)

 

@Patrick2788 
Thank you very much for the solution. Have a fine day !