Ask Your Question

Calc: Neater way to ignore errors

asked 2020-10-16 00:37:03 +0100

vxky33x0egwnf4 gravatar image

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?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2020-10-16 12:20:00 +0100

Opaque gravatar image

updated 2020-10-16 12:22:14 +0100


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

See also: LibreOffice Help - IFERROR

Hope that helps.

edit flag offensive delete link more


Perfect! Thanks @Opaque.

vxky33x0egwnf4 gravatar imagevxky33x0egwnf4 ( 2020-10-16 15:52:46 +0100 )edit

answered 2020-10-16 11:19:18 +0100

Pansmanser gravatar image

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
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-10-16 00:37:03 +0100

Seen: 76 times

Last updated: Oct 16 '20