Intermediate / Lesson 12

IFERROR & ROUND

Handle known exceptions and choose a deliberate precision policy.

~25 minutesUpdated 2026-10-194 exercisesSee lesson notes for version and platform support

By the end, you’ll be able to:

  • Use a meaningful fallback for an error
  • Distinguish rounded values from rounded display
  • Preserve valid zero results and diagnose hidden problems

Inspect the original calculation first

Unit cost equals total Cost divided by Units. For item A, 100 ÷ 3 gives 33.3333…; item B has zero units and produces #DIV/0!. Item C has zero cost and five units, giving a valid zero.

A fallback should reflect the business meaning. “Check units” tells a reader that a unit-cost result is unavailable. Replacing every error with zero can make a broken input look like a free unit.

Example worksheet with column letters and row numbers
ABC
1ItemCostUnits
2A1003
3B450
4C05

Handle errors with a deliberate alternative

=IFERROR(value, value_if_error)

value is the expression to calculate. value_if_error is the result to use if that expression produces an Excel error. Valid zero and FALSE results are not errors.

=IFERROR(B2/C2,"Check units") returns 33.3333… for item A and Check units for a zero-unit case. IFERROR catches multiple kinds of errors, not just division by zero. If your only intended exception is a zero denominator, an explicit IF(C2=0,...) guard makes that policy narrower.

Round the value when the calculation requires it

=ROUND(number, num_digits)

number is the value or calculation. num_digits gives decimal places: 2 for hundredths, 0 for whole numbers, and negative values for positions to the left of the decimal point.

=ROUND(B2/C2,2) returns 33.33. =ROUND(1234,-2) returns 1200. Excel rounds a halfway value away from zero; consider the precision policy and floating-point inputs when checking sensitive calculations.

Formatting and rounding are different actions

Displaying 100/3 with two decimals shows 33.33 while the underlying value remains approximately 33.3333. ROUND changes the calculated result to 33.33. Multiplying by 3 then gives 99.99 rather than 100.

Choose whether policy requires rounding each line before summing, or summing full-precision values and rounding once. Those methods can disagree. Document the rule rather than repeatedly adding ROUND until a total matches an expectation.

Combine handling with a precision rule

=IFERROR(ROUND(B2/C2,2),"Check units") returns a two-decimal calculated unit cost when division succeeds and a message when it fails. Test ordinary data, zero units and valid zero cost.

Review a sample of fallback rows so a broken reference or text input is not hidden by the friendly message. IFERROR and ROUND work in current web Excel and established desktop editions. The checker supports the lesson’s numeric cases; it is not a substitute for checking a workbook’s input quality.

Now make it yours

Give it a try.

Work through each exercise, check your answer and use a hint whenever you need one. Formula tasks check changed inputs, including boundary cases.

0 of 4 exercises complete

Exercise 01 / Formula practice

Use a meaningful fallback

Return Cost B2 divided by Units C2, using IFERROR to return Check units on an error. Enter E2.

Example worksheet with column letters and row numbers
ABC
1ItemCostUnits
2A1003
3B450
4C05
Exercise 02 / Formula practice

Round a unit cost

Use ROUND to calculate B2/C2 to two decimal places. The test units are nonzero. Enter E3.

Example worksheet with column letters and row numbers
ABC
1ItemCostUnits
2A1003
3B450
4C05
Exercise 03 / Formula practice

Combine precision and error handling

Round unit cost B2/C2 to two decimals and return Check units if the calculation errors. Enter E4 using ROUND and IFERROR.

Example worksheet with column letters and row numbers
ABC
1ItemCostUnits
2A1003
3B450
4C05
Exercise 04 / Knowledge check

Explain a rounding difference

You format =100/3 to show two decimals, but the stored result still sums differently from three values of 33.33. Why?

Choose one answer

The practice checker accepts any supported formula that solves the task, including whole-column ranges where supported, lowercase function names and text labels, extra spaces, and comma or semicolon separators. Array tasks check the complete result shape and values. It is a teaching tool, not a complete Excel engine. See supported behavior.

Take this with you

Use an informative error fallback, preserve valid zero and distinguish display precision from a deliberate rounding policy.

Practice in Excel

Download the course workbook, follow the tasks, save your completed .xlsx and check its supported formula tasks here. Native Excel features use a separate review checklist.

Download practice workbook Check my workbook ↗
Technical references and lesson review

Original lesson content. Technical behavior checked against Microsoft documentation. Technical review: 2026-10-16. Page updated: 2026-10-19. How SheetSprout develops and checks lessons.

Find your next skill