📊Google Sheets Diagnostic PlaybookUpdated 2026-11-06

Google Sheets: Fix #NAME? Unknown Function Name Error

Exact Error Message:#NAME? Unknown function: "XYZ".
⚡ Direct Answer / Immediate Fix:

Check the spelling of the function name against official Google Sheets syntax.

Why This Error Occurs (Root Cause Analysis)

A formula name is misspelled (e.g. =VLOOKP instead of =VLOOKUP), an unquoted text string is interpreted as a function or named range, or a custom Apps Script function is missing or unapproved. The #NAME? error occurs when the calculation engine fails to recognize a function name, formula keyword, or named range. The most frequent causes are typographical errors in function spelling (e.g. `=VLOOKP` instead of `=VLOOKUP`), omitting required double quotation marks around text strings (e.g. `=IF(A1=Approved, ...)` instead of `=IF(A1="Approved", ...)`), or referencing a Named Range that was deleted.

Step-by-Step Resolution Guide

Follow these verified steps in sequence to isolate and eliminate the error condition:

1
Check the spelling of the function name against official Google Sheets syntax.
2
Enclose literal text strings in double quotation marks: =IF(A2="Active", 1, 0) instead of =IF(A2=Active, 1, 0).
3
If calling a custom Apps Script formula, open Extensions > Apps Script and ensure the function is declared globally in a `.gs` file and saved.
4
Check Data > Named ranges to confirm any referenced range names exist and match exact spelling.

Technical Edge Cases & Environment Exceptions

⚠️ Critical Edge Case Scenarios

Regional formula syntax differences: When copying formulas from European or South American tutorials, semicolons (;) are used as argument separators instead of commas (,), and function names may be translated (e.g., `BUSCARV` instead of `VLOOKUP`).

When This Doesn't Work (Alternative Diagnostics & Workarounds)

🔧 Advanced Escalation & Fallback Workarounds

If spelling is verified, check your Google Sheets Named Ranges under Data > Named ranges. If a formula references a named range that was deleted, renamed, or scoped to a different tab, the engine interprets the token as an invalid function identifier.

Prevention Checklist & Operational Standards

🛡️ How to Permanently Prevent Recurrence

Use the auto-suggest formula popup in Google Sheets to select verified functions rather than typing names from memory.

Frequently Asked Questions: #NAME? Unknown function: "XYZ".

Why does #NAME? appear when I type an IF statement with text?

If text strings are not enclosed in double quotes, Google Sheets interprets the word as a Named Range or function name. For example, `=IF(A2=Yes, 1, 0)` causes #NAME? because Sheets looks for a named entity called "Yes". Use `=IF(A2="Yes", 1, 0)`.

Can custom Google Apps Script functions cause #NAME? errors?

Yes. If a custom script function has syntax errors in the Apps Script editor, throws an uncaught exception during loading, or was saved under a different project, Google Sheets will fail to bind the formula and display #NAME?.

How do formula parameter separators vary across international sheet locales?

In US and UK locales, formula arguments are separated by commas (`,`). In European and South American locales where the comma is used as a decimal separator, formula arguments must be separated by semicolons (`;`).

Why does a valid custom Apps Script formula suddenly display #NAME??

Custom Apps Script formulas will throw #NAME? if the underlying Apps Script project was detached, if authorization tokens expired, or if the function name in code was changed from what is written in the cell.

How does missing quotation marks around string values cause #NAME??

If you enter `=IF(A1=Pending, "Yes", "No")` without quotes around Pending, Google Sheets assumes Pending is a named range or function. Wrapping text in double quotes (`=IF(A1="Pending", ...)`) immediately resolves the issue.

Related Guides & Architecture Walkthroughs

More Google Sheets Diagnostic Playbooks