Feb 02, 2021 04:34 AM
Hey everyone,
I’m trying to add a field that will return either a calculation or text based on whether another cell is empty or not.
I have a working formula for the difference between two dates, but I want to put that inside an IF formula that will return the value of the difference in days if the field is populated or a text “Not Yet Resolved” if the field is empty.
Here’s what I have at the moment:
IF({Resolved} != BLANK() , VALUE(DATETIME_DIFF(Resolved, Created, ‘days’)) , “Not Yet Resolved”)
But it is returning an error.
Can somebody provide a solution?
Thanks
Feb 02, 2021 04:46 AM
Hello Alex
I think it’s because of the VALUE function, because DATETIME_DIFF should return a number and not a text string, which is the correct input for the VALUE function. Try removing it:
IF({Resolved} != BLANK() , DATETIME_DIFF(Resolved, Created, ‘days’) , “Not Yet Resolved”)
Feb 02, 2021 04:48 AM
Thanks for the reply!
Airtable is telling me that its an invalid formula though.
Any other suggestions?