Oct 03, 2020 02:50 PM
Hi everyone
I have a habit/task table, the time period is on a multiple choice column (daily, weekly, bi-weekly monthly, etc.). I keep track of the last time it’s done (the date).
Is there a formula that can take both into consideration and tell me if something is overdue?
for example if it has been more then a week since i did a weekly task.
Oct 07, 2020 10:12 AM
i am sorry to bother you again, i have to lists and it doesn’t work in my other one, i don’t know what’s my mistake
this is the formula:
SWITCH(
{Frequency},
‘multiple times a day’, DATEADD({Last time done},1,‘day’),
daily’, DATEADD({Last time done},1,‘day’),
‘twice a week’,DATEADD({Last time done},3,‘day’),
‘weekly’,DATEADD({Last time done},1,‘week’),
‘bi-weekly’,DATEADD({Last time done},2,‘week’),
‘monthly’,DATEADD({Last time done},1,‘month’),
‘3 months’,DATEADD({Last time done},3,‘month’),
‘as needed’,DATEADD({Last time done},3,‘month’),
‘6 months’,DATEADD({Last time done},6,‘month’),
‘yearly’,DATEADD({Last time done},1,‘year’)
)
also is there a way to make it ignore empty cells rather then say they are overdue?
Oct 07, 2020 04:30 PM
Airtable is weird about quotation marks. Sometimes if you copy and paste from a different program, you end up with the directional quotations like in the above text, which it doesn’t like. Try redoing those - otherwise, your code looks great! In terms of empty cells, you could do something like this:
IF({Last Completed},IF(TODAY()>{Due Date},"Yes","No"),"")
The first IF() checks to see if there’s anything in “Last completed”, and if yes, it goes to the second IF(). You could also make a case in the Switch() statement to cover this so that it doesn’t show #ERROR when the cell is empty.
Oct 07, 2020 10:27 PM
I didn’t do it in a different program i did it on airtable, that’s what’s weird.
It’s my first time trying, never tried to code before and was just trying to make it like the previous one you sent.
Don’t know how to code so i didn’t understand the last part about using a switch to make it ignore empty cells, currently I’m using only the yes rather then yes and no to make it pop out.
Oct 10, 2020 02:44 PM
I looked over your code again. Look at the third line. ‘Daily’ is missing the first quote