ShareYourGroupShareYourGroupGoogle Sheets

Guides

Errors in Google Sheets and how to fix them

When Sheets cannot work out a formula, the cell shows a code starting with a hash sign. Hover the pointer over the cell and a note explains the cause in a sentence. Read that note first. It is usually precise. This guide lists the codes and their usual cures.

At a glance

ErrorMeaning
#N/Aa value was not found
#REF!a reference is invalid, or a result cannot spread out
#VALUE!the wrong kind of data
#DIV/0!division by zero or by an empty cell
#NAME?an unknown function or name
#NUM!an impossible number
#ERROR!the formula could not be read at all
#NULL!rare; usually arrives with imported Excel files
Sample sheet: A small price list with item codes. The table is sorted by code.
ABCDE
1CodeItemCategoryPriceStock
2A101Basmati Rice 5 kgGrocery65040
3A102Toor Dal 1 kgGrocery16075
4B201NotebookStationery60300
5B202Ball PenStationery100
6C301LED BulbElectronics110200
7C302Power BankElectronics129918
8D401Steel BottleHome45055

#N/A

A lookup or a match found nothing.

Check for stray spaces, for numbers stored as text on one side, and for a lookup range that moved when the formula was copied. See IFERROR and IFNA.

#REF!

Three different causes share this code. The hover note tells them apart.

Also: a VLOOKUP index larger than the width of its range, and a circular dependency, where a formula refers to its own cell.

#VALUE!

A function was given data of the wrong kind.

Other causes: a QUERY whose text cannot be parsed (the note quotes the problem), REGEX functions given a number instead of text, and dates that Sheets has read as text because of the locale.

#DIV/0!

AVERAGE and AVERAGEIF give the same error when there are no numbers to average.

#NAME?

Causes: a misspelt function, text without quotation marks, a named range that does not exist, or a function from Excel that Sheets does not have.

#NUM!

A number that cannot be: the square root of a negative number, DATEDIF with its dates in the wrong order, or a result too large to hold.

#ERROR!

Particular to Sheets. It means "formula parse error": the formula is not written in a form Sheets can read. Look for:

"Loading..." that does not finish

Import functions and GOOGLEFINANCE show "Loading..." while they fetch data. A few seconds is normal. If it never ends, the usual reasons are too many import formulas in one file, a chain of files importing from one another, or a source that is not answering. Reduce the number of imports, and import from the original source.

A formula shown as text

If the cell displays the formula itself, it was formatted as plain text before you typed, or there is an apostrophe or a space before the equals sign. Set Format, Number, Automatic and enter the formula again. Also check that View, Show, Formulae is not switched on.

Wrong answers with no error

These are the dangerous ones.

Check totals against a small hand calculation, and compare COUNT with COUNTA on columns that should be all numbers.

Hiding errors

=IFERROR(formula) blanks any error. Use it on formulas you know to be right, for failures you expect. An error you do not understand is information. Fix the cause first.

The results on this page were worked out by us from the sample sheet; they were not produced by a script running Google Sheets. If Sheets shows you something different, please tell us.

This is an independent help site. It is not connected with or approved by Google. Google Sheets is a trademark of Google LLC, named here only to say which program a formula is for. The people and figures in the sample sheets are made up.