Forum Discussion
DeanCalandine
Jan 02, 2024Copper Contributor
Check due date
Hi All,
i’m trying to work out the best way to check a date in a cell to the date today, i want it to return a value in an adjacent cell of either “Due” if is is within the current month, “Overdue” if it is in a previous month to the current month or “Okay” if it is not due yet, so in the future. I hope i’ve explained it correctly and any help would be appreciated.
Thanks
As variant
=SWITCH( SIGN(EOMONTH(TODAY(),0) - EOMONTH(date,0)), 0, "Due", 1, "Overdue", "Okay")
3 Replies
- SergeiBaklanDiamond Contributor
As variant
=SWITCH( SIGN(EOMONTH(TODAY(),0) - EOMONTH(date,0)), 0, "Due", 1, "Overdue", "Okay")- DeanCalandineCopper Contributor
- PeterBartholomew1Silver Contributor
Maybe something like
= LET( monthsElapsed, DATEDIF(dates, TODAY(), "m"), IFS(monthsElapsed=0, "Okay", monthsElapsed= 1, "Due", monthsElapsed>1, "Overdue") )