Help

Formula Calculation Inside an IF Formula

Topic Labels: Formulas
1297 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Alex_Jones1
5 - Automation Enthusiast
5 - Automation Enthusiast

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

2 Replies 2
Daniela_Hecht
6 - Interface Innovator
6 - Interface Innovator

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

Thanks for the reply!
Airtable is telling me that its an invalid formula though.
Any other suggestions?