Calc: Neater way to ignore errors

Let’s consider any (potentially lengthy) function that can produce an error. For discussion’s sake, I’ll use =1/0. I can ignore the resulting error by using the following formula:


As you can see, the function (e.g. 1/0) is typed twice. Is there a neater way to do this?

What result do you want when the formula fails? You can work around the error by writing the formula into a macro function. Of course you have to be able to recognise that this is an error result. eg

function myfunction(i) as double
on error goto oops
myfunction = 1.0/i
exit function
end function


check function IFERROR(): In your example it would read: =IFERROR(1/0;"")

See also: LibreOffice Help - IFERROR

Hope that helps.

Perfect! Thanks @anon73440385.