Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Formula Calculation Inside an IF Formula

Topic Labels: Formulas
217 2
cancel
Showing results for 
Search instead for 
Did you mean: 

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

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?