Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

excel comparing dates error

Writer Matthew Harrington

I have a table with dates:

 A
3 5/05/2020
4 5/05/2020 

and the formula in column B is: =IF(A4<>A3,"true","false")

Since dates are the same I expect to get a FALSE, but I am getting TRUE I have four different tables, and this works as expected in three of them, but does not work for the 4th. Not sure what to look into, checked formatting.

Edit: If formatted as General it shows:

43956.91667
43956.95833

Tried this with other working tables and they have: 43986

How would I format them to be the same? I tried Decrease Decimal option, but it rounds 6/05/2020 to be the same as 5/05/2020

3

1 Answer

It looks like your dates are, or were, originally added as dates and times. Rounding the values in your formula down to the nearest whole number will make them a date value rather than a date/time value. Try this:

=IF(ROUNDDOWN(A4,0)<>ROUNDDOWN(A3,0),"true","false")

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy