ERROR.TYPE function
a number corresponding to an error type.
Information
Where can you use it?
Workbook and data quality owners. Use functions that inspect cell type, errors or the calculation environment when validating a report.
Scenario in the workbook
Classify errors in a ratio calculation. Division by zero has code 2.
A worked example from the workbook
| Row | A | B |
|---|---|---|
| 6 | Value | Comparison |
| 7 | 10 | 2 |
| 8 | 5 | 5 |
| 9 | 1 | 0 |
Record 1
=IFERROR(ERROR.TYPE(A7/B7),0)Expected result0
See the inputs and instructions for all 3 examplesCopyable formulas
English Excel · en-US
=ERROR.TYPE(1/0)Turkish Excel · tr-TR
=HATA.TİPİ(1/0)Expected result
2
Worked examples
Classify errors in a ratio calculation. Division by zero has code 2.
Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.
| Row | A | B |
|---|---|---|
| 6 | Value | Comparison |
| 7 | 10 | 2 |
| 8 | 5 | 5 |
| 9 | 1 | 0 |
| Case | Formula | Expected result |
|---|---|---|
| Record 1 | =IFERROR(ERROR.TYPE(A7/B7),0) |
0 |
| Record 2 | =IFERROR(ERROR.TYPE(A8/B8),0) |
0 |
| Record 3 | =IFERROR(ERROR.TYPE(A9/B9),0) |
2 |