The Excel ERROR.TYPE function returns a number that corresponds to a specific error value. You can use ERROR.TYPE to test for specific kinds of errors. If no error exists, ERROR.TYPE returns #N/A. See below for a key to the error codes returned by ERROR.TYPE.
Test for a specific error value
An error number or #N/A if no error.
error_val - The error for which to get an error code.
Use ERROR.TYPE to get a number that corresponds to a specific error value. See below for a key to the error codes returned by ERROR.TYPE. If no error exists, ERROR.TYPE returns #N/A.
In most cases, error_val will be supplied as a reference to a cell that may contain an error value.
One way to use ERROR.TYPE is to test for specific errors and display a relevant message (instead of error values) when certain error conditions exist.
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.