Information
All versions
◉ 52 views
=ERROR.TYPE()
Returns a number corresponding to one of the error values in Microsoft Excel or returns the #N/A error if no error exists. You can use ERROR.TYPE in an IF function to test for an error value and return a text string, such as a message, instead of the error value.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=ERROR.TYPE(error_val)
Hover argument names in the table for details.
Output typeNumber
Popularity10 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground
Dedicated file for this function — safe & lightweight · sample data + live formulas
⬇ Download Sample Workbook
A dedicated .xlsx for =ERROR.TYPE() with Persian sample data & live formulas — open in Excel and practice.
- Sheet “Sample” — data table + formula in place
- Sheet “Guide” — syntax, arguments & tips from this page
- Instant & secure (token + rate limit)
Quiz this function
%d questions — syntax, example & errors — test yourself!
◧ Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
error_val |
Any type | Required | The error value whose identifying number you want to find. Although error_val can be the actual error value, it will usually be a reference to a cell containing a formula that you want to test. #NULL! = 1; #DIV/0! = 2; #VALUE! = 3; #REF! = 4; #NAME? = 5; #NUM! = 6; #N/A = 7; #GETTING_DATA = 8; Anything else = #N/A. |
▣ Examples
▦ Data
| Cell | Value |
|---|---|
A2 |
#NULL! |
A3 |
#DIV/0! |
A4 |
#NULL! |
A5 |
#DIV/0! |
Number of the #NULL! Error(1).
=ERROR.TYPE(A2)
Result:
1
Checks cell A3 to see whether the cell contains either the #NULL! error value or the #DIV/0! error value. If it does, then the number for the error value is used in the CHOOSE worksheet function to display one of two messages; otherwise, the #N/A error value is returned.
=IF(ERROR.TYPE(A3)<3,CHOOSE(ERROR.TYPE(A3),"Ranges do not intersect","The divisor is zero"))
Result:
The divisor is zero
⚠ Common Errors
#NULL!
#NULL! = 1; #DIV/0! = 2; #VALUE! = 3; #REF! = 4; #NAME? = 5; #NUM! = 6; #N/A = 7; #GETTING_DATA = 8; Anything else = #N/A.
Fix: بررسی کنید آیا فرمول واقعاً خطای #NULL! تولید میکند؛ برای رفع آن مرجعها را با کاما یا عملگر مناسب جدا کنید.
#DIV/0!
#NULL! = 1; #DIV/0! = 2; #VALUE! = 3; #REF! = 4; #NAME? = 5; #NUM! = 6; #N/A = 7; #GETTING_DATA = 8; Anything else = #N/A.
Fix: بررسی کنید مخرج صفر نباشد؛ از IF یا IFERROR برای مدیریت تقسیم بر صفر استفاده کنید.
#VALUE!
#NULL! = 1; #DIV/0! = 2; #VALUE! = 3; #REF! = 4; #NAME? = 5; #NUM! = 6; #N/A = 7; #GETTING_DATA = 8; Anything else = #N/A.
Fix: بررسی کنید آرگومانها نوع داده مناسب داشته باشند و تبدیل متن به عدد ممکن باشد.
#REF!
#NULL! = 1; #DIV/0! = 2; #VALUE! = 3; #REF! = 4; #NAME? = 5; #NUM! = 6; #N/A = 7; #GETTING_DATA = 8; Anything else = #N/A.
Fix: ارجاعهای حذفشده یا نامعتبر را اصلاح کنید؛ محدودههای حذفشده را بازسازی کنید.
#NAME?
#NULL! = 1; #DIV/0! = 2; #VALUE! = 3; #REF! = 4; #NAME? = 5; #NUM! = 6; #N/A = 7; #GETTING_DATA = 8; Anything else = #N/A.
Fix: نام تابع یا محدوده نامگذاریشده را از نظر املایی بررسی کنید و متنها را داخل گیومه بگذارید.
#NUM!
#NULL! = 1; #DIV/0! = 2; #VALUE! = 3; #REF! = 4; #NAME? = 5; #NUM! = 6; #N/A = 7; #GETTING_DATA = 8; Anything else = #N/A.
Fix: بررسی کنید اعداد در محدوده مجاز تابع باشند و تکرار محاسبات همگرا شود.
#N/A
#NULL! = 1; #DIV/0! = 2; #VALUE! = 3; #REF! = 4; #NAME? = 5; #NUM! = 6; #N/A = 7; #GETTING_DATA = 8; Anything else = #N/A.
Fix: Check with ISERROR before using
💬 Comments & Q&A 0 approved
🔒 Your comment will be published after review.Share your thoughts — visible after admin approval
No comments yet — be the first!