Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

IFERROR equivalent

cancel
Showing results for 
Search instead for 
Did you mean: 
Luke_Thompson
5 - Automation Enthusiast
5 - Automation Enthusiast

It would be very helpful to have a new formula function akin to Excel’s IFERROR, or even add an optional fourth parameter to IF as a branch to be taken if an error occurs in evaluating the expression. e.g., IF([logical argument],[true branch],[false branch],[error branch])

5 Comments
William_Nutt
6 - Interface Innovator
6 - Interface Innovator

Too late for @Luke_Thompson, I’m sure, but for anyone else who may come across this: I was just seeking the same solution and found the ISERROR function, which can be paired with IF for an IFERROR equivalent.

Stefano_Corsini
4 - Data Explorer
4 - Data Explorer

Hi Nate, can you share the actual formula you used? Appreciate it.

kuovonne
18 - Pluto
18 - Pluto

Welcome to the Airtable community!

You can see the documentation for the ISERROR() function in the formula field reference. Here is an example usage

IF(
  ISERROR( {num1} / {num2}),
  "you are probably dividing by zero",
IF(
  {num1} / {num2} > 1,
  "got an answer bigger than 1",
  "got an answer less or equal to one"
))
Maxim_KM
6 - Interface Innovator
6 - Interface Innovator

It causes extensive calculations to be executed twice :exploding_head:

Definitely, Airtable should have IFERROR(value, value_if_error)

Example of formula I have because of lack of IF ERROR:

IF(
ISERROR(LEFT(TRIM({Full Name TL}), SEARCH(" ",TRIM({Full Name TL})) + 1) & ".\n*" & REGEX_EXTRACT({Funding Information Translated}, "City: (.+)\n") & "*"),
 "", 
LEFT(TRIM({Full Name TL}), SEARCH(" ",TRIM({Full Name TL})) + 1) & ".\n*" & REGEX_EXTRACT({Funding Information Translated}, "City: (.+)\n") & "*")
kuovonne
18 - Pluto
18 - Pluto

That’s just part of the nature of Airtable formulas. It’s a bit of a pain, but it’s what we have to deal with for now. If you don’t want to repeat the calculation in the formula, you can move the calculation to a different field and then just use the field name twice. Of course, that technique has its own issues as well.