Replace #DIV/0! with a dash using IFERROR
Keep a report readable when a division has nothing to divide by.
IFERROR
Returns a value you choose when a formula errors, and the formula's result otherwise. Below is 1 interactive exercise that puts it to work on realistic business data — you write the formula, and get told exactly what went wrong when it does not work.
IFERROR(value, value_if_error)
Need a refresher? Learn IFERROR — syntax, a worked example and where it goes wrong.
Ordered from most approachable to hardest.
Returns a value you choose when a formula errors, and the formula's result otherwise. It belongs to the logical functions family, and it shows up constantly in real work — which is why it is worth being genuinely fluent rather than merely familiar.
Before this one, it helps to be comfortable with IF. The exercises below assume that ground is covered.
Reading about a function is not the same as being able to write it. The exercises on this page exist because the gap between recognising IFERROR and producing it from memory, correctly, on data you have not seen before, only closes by doing it.