Functions
ERROR.TYPE
Number corresponding to the error type
Try it
When to use it
When should I use ERROR.TYPE?
Use ERROR.TYPE to identify which specific error a formula produced — it returns a number (1=#NULL!, 2=#DIV/0!, 3=#VALUE!, etc.) so you can branch on the error kind in IF or SWITCH logic.
Used in
Syntax
ERROR.TYPE(value)Examples
=ERROR.TYPE(1/0) // => 2
=ERROR.TYPE(VALUE("x")) // => 3
=ERROR.TYPE(NA()) // => 7