ERROR.TYPE
Information

Returns a number corresponding to an error type

Syntax:

=ERROR.TYPE(error_val)

Example:

=ERROR.TYPE(#DIV/0!)