Help

Replacing NaN with Blank (purely for visual purposes)

Topic Labels: Formulas
2677 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Torus_Global
6 - Interface Innovator
6 - Interface Innovator

Hi everyone,

I have a “Days Remaining” formula in a Project Management Task View, and the formula looks like this: DATETIME_DIFF({Due Date}, TODAY(), ‘days’)…

Naturally, if the “Due Date” cell is empty, the “Days Remaining” cell shows “NaN”…

Is there anything I can add into the formula to make the “NaN” disappear, in other words, be replaced with a Blank cell? It’s purely for visual purposes…

I’ve tried to add “BLANK()” into the formula, but that didn’t seem to change it so I must be doing it wrong. DATETIME_DIFF({Due Date}, TODAY(), ‘days’, BLANK())…

Thanks,
Christopher

2 Replies 2

Wrap the formula in an IF function and omit the third argument (the ‘else’ part).

IF( {Due Date},
  DATETIME_DIFF({Due Date}, TODAY(), 'days')
)

Amazing. Thank you, @kuovonne