Hi - I am using Airtable as a project management tool, each task has start and finish dates (though sometimes the start date is blank) and there are 2 checkbox columns - ‘Started’ and ‘Done’.
I’ve now created another column called ‘Status’ which I want to automatically update using a formula.
However I’m getting stuck with an error whenever the start date is blank and the finish date is before today (in which case the Status should be “Overdue!”).
The formula (edited to remove subsequent parts which are irrelevant to this error) is:
IF({Done?}=1, “Complete”, IF(AND({Start date}="",{Finish date}=""), “Timing TBC”, IF(AND(OR(AND({Start date}="", IS_BEFORE({Finish date}, DATEADD(TODAY(), 7, ‘days’))), IS_BEFORE({Start date}, DATEADD(TODAY(), 7, ‘days’))), {Done?}=0, {Started?}=0), “Coming up”, IF(AND(IS_BEFORE({Finish date}, TODAY()), {Done?}=0), “Overdue!”, “”))))
Essentially, the 1st condition is that the ‘Done’ column is checked -> “Done”
The 2nd condition is that the start & finish dates are blank -> “Timing TBC”
The 3rd condition is that (either the start date is blank & the finish date is within a week of today, or the start date is within a week of today) and it’s not ‘Done’ or ‘Started’ -> “Coming up”
The 4th condition is that the finish date is before today and it’s not ‘Done’ -> “Overdue!”
I think I read somewhere that as soon as a formula returns an error (eg. because of a blank date field) it won’t go any further.
From what I can work out, the error is coming from the 3rd condition, because when I tested a formula with only the first 2 conditions, it returned “” rather than an error.
Can anyone tell me where I’m going wrong?
Thanks!
