When you work in Excel spreadsheets, you’ll often find yourself using formulas. But it’s quite easy to make mistakes in these formulas. You might want a quick and easy way to identify errors and make sure they’re clearly visible so that you can correct them. Fortunately, Excel offers a way to do exactly that. Let’s learn how to use IFERROR in Microsoft Excel.
How to Use IFERROR in Excel
Imagine that you have several numbers in a column that you’re dividing by values contained in column B. For example, 500 in cell A1 divided by 2 in cell B1 gives you the value 250 in cell C1. You have multiple rows, but in some rows, you’ve accidentally divided the column A values by 0. You want a fast way to identify this mistake with custom verbiage.
This is where Excel’s IFERROR function comes in. To use it, click into any empty cell on your worksheet. For simplicity, we’ll use cell D1 here. Begin by typing an = sign. This tells Excel that you’re inputting a formula.
Then, type IFERROR(. This adds the IFERROR function to your formula, which now reads:
Then, type in the formula that you want to find the error in. Here, this is A1/B1:
Type a comma. Now, it’s time to tell Excel what text you want displayed if Excel finds an error in the formula, which here means dividing by zero. Typing in quotes, add “Divide by Zero!”, then close the parentheses. Your completed IFERROR formula now reads:
=IFERROR(A1/B1,”Divide by Zero!”)
Hit Enter on your keyboard, and Excel will simply return the mathematical value of 250. Finally, copy your formula downward. Notice that the formula in row 2 attempts to divide 75 by 0. Cell D2 with your IFERROR formula will return the Divide by Zero! text.
As you can see, Excel’s IFERROR feature is a fast, elegant way to identify errors inside your Excel spreadsheet formulas.