Skip to main content

Use formula to find oldest date in row

  • March 2, 2017
  • 3 replies
  • 49 views

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.

This topic has been closed for replies.

3 replies

Forum|alt.badge.img+18

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"
)
)

  • Author
  • New Participant
  • March 10, 2017

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"
)
)

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.


  • Author
  • New Participant
  • March 10, 2017

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.


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

Thanks for the response.