How do I return nothing when a field is empty as opposed to "#ERROR"?


When my Birthday field is empty, how do I get Age to show nothing as opposed to “#ERROR”? Here is my formula at this point:

DATETIME_DIFF(TODAY(), {Birthday}, ‘years’)

Thanks for any help given.


You can use the IF function:

IF({Birthday}, DATETIME_DIFF(TODAY(), {Birthday}, ‘years’))


Thanks, but I get an “invalid formula” response with this.


I just copied it from a test base where it’s working. I suspect the problem is the quote, you should understand the recommendation and try yourself and not only copy and paste.


You should be able to copy-and-paste this version of the formula successfully. (Note the difference in the single quotes: The version Elias posted had been ‘pretty formatted’ into ‘inverted comma’ style opening and closing single quotes — which Airtable does not like. Instead, you need to use the ‘straight single quote’ found in the following version. Alternatively, you can do as Elias suggests and simply overwrite the curly quotes with the straight one found on your keyboard.)

IF({Birthday}, DATETIME_DIFF(TODAY(), {Birthday}, 'years'))


@Elias_Gomez_Sainz I learn something new every day. Although I regularly use abbreviated comparisons in IF() statements when testing for zero vs. non-zero — e.g., IF(FIND('.',SomeText),This,That), for some reason it hadn’t sunk in I could do the same thing with BLANK() vs. not-BLANK(). Until about 5 minutes ago, I would have written that formula as


Thanks for helping me trim redundant code!


@W_Vann_Hall and @Elias_Gomez_Sainz

That worked like a charm! Thanks to both of you guys for the help.