I have created a formula that relies on data input (event attendee numbers) to provide a result. However, until we input our data (number of attendees) in column A, the column where the answer would display (column B) has an error message. How can we hide the error message with a rule?

  • 3
    Check out the IFERROR function. See this answer: How do I hide the #DIV/0! error while a referenced cell is blank? (different error condition in that question, but the function works for any). – fixer1234 Aug 24 '18 at 0:44
  • 1
  • Do not try to mask the error - remove its possibility. Edit your function and handle the case of data is absent or wrong. The simplest way is to check the passed values for correct ones as a start of function code. If some type(s) and/or value(s) is not correct - assign some specific value (empty string, zero, 'Wrong argument' literal, etc.) to a result and exit function, if all values are correct - calculate as need. – Akina Aug 24 '18 at 5:00

Iferror will only mask the problem.
If you add a =IF(A2="","",YOUR FUNCTION) the calculation will not happen and use unnecessary CPU.

This is especially good if you have chain calculations or heavy functions.

The if() will make sure to not do any calculations unless there is a value in A2 and only display empty value in B2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.