Use formula to find oldest date in row


#1

Hi,

I have a row with several expiration dates in different columns. I’d like a cell to calculate which of these dates in the row is next date to Expire. I’ve tried MIN() but it doesn’t recognise date values.

Any suggestions?

Thanks.


#2

Use nested IF statements to create an IF/ELSE/ELSE along with the DATETIME_DIFF() and TODAY() or NOW() methods.

IF (
DATETIME_DIFF(...) >DATETIME_DIFF(...),
"First field is greatest",
IF (
DATETIME_DIFF(...) > DATETIME_DIFF(...),
"Second field is greatest",
"Third field is greatest"
)
)

#3

It’s not working. I can’t even get the cell to show if the date is < or > than today in a standard IF formula.

I am using LOCAL date format.


#4

I’ve changed it a little and now calculating the months and using MIN so it is working now.

Thanks for the response.