Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Excel Bar Chart
  • How to create a Histogram in Excel
  • Example of COUNTIFS with variable table column in Excel
  • Randomize/ Shuffle List in Excel
  • Get column index in Excel Table

References

  • Get nth match with INDEX / MATCH in Excel
  • Count rows that contain specific values in Excel
  • Two-column Lookup in Excel
  • Count rows with at least n matching values
  • To count total rows in a range in Excel

Data Validations

  • Excel Data validation number multiple 100
  • Excel Data validation specific characters only
  • Excel Data validation whole percentage only
  • Excel Data validation date in specific year
  • How To Create Drop-down List in Excel

Basic error trapping example in Excel

by

To catch errors that a formula might trigger in a worksheet, you can use the IFERROR function to display a custom message, or nothing at all. See example below:

Formula

=IFERROR(formula,value_if_error)

Explanation

In the example shown, the formula in E5 is:

=IFERROR(C5/D5,"")

How this formula works

In this example, the IFERROR function is used to trap and suppress the #DIV/0! error that occurs when there is no value for Orders (column D). Without IFERROR, the formula C5/D5 would display a #DIV/0! error in E6 and E9.

The IFERROR function takes two arguments: a value (usually entered as a formula), and a result to display if the formula returns an error. The second argument is only used if the first argument throws an error.

In this case, the first argument is the simple formula for calculating the average order size, which divides total sales by the order count:

=C5/D5

The second argument is entered as an empty string (“”).

When the formula returns a normal result, the result is displayed.

When the formula returns #DIV/0!, an empty string is returned and nothing is displayed.

Post navigation

Previous Post:

How to calculate project complete percentage in Excel

Next Post:

Popularly Used Excel Functions and their examples

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • SWITCH function example in Excel
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation
  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel OR Function
  • FALSE function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Convert date to Julian format in Excel
  • DAY function: Description, Usage, Syntax, Examples and Explanation
  • Get work hours between dates in Excel
  • How to get Holiday Date from Year in Excel
  • Excel Date & Time Functions Example

Grouping

  • How to randomly assign data to groups in Excel
  • Group numbers at uneven intervals in Excel
  • How to randomly assign people to groups in Excel
  • Running count group by n size in Excel
  • Group times into unequal buckets in Excel

General

  • Excel Operators
  • 231 Keyboard Shortcut Keys In Excel
  • Lock Cells in a Worksheet Excel
  • How to get original number from percent change in Excel
  • How to get random value from list or table in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning