6 / 6 · Intro
Reading error values
An error such as #DIV/0! is not a crash. It is a value with a name, and its name tells you what went wrong.
Jump to the 10 practice questionsYou will learn
- Read the common error values
- Trace an error back to the first cell
- Know where Excel and Google Sheets differ
Before this: Copying formulas: relative references
1Explain
Errors are values
When a formula cannot produce an answer, it produces an error value instead. The error sits in the cell like any other value, and any formula that uses that cell gets the same error. That is why one mistake can fill a whole column with #VALUE!: the error flows down every formula that depends on it. The good news is that there are only a handful of error names, and each one points at a different cause. Google's ERROR.TYPE help lists the same set that Excel uses.
| Error | Usual cause | First thing to check |
|---|---|---|
| #DIV/0! | dividing by 0 or by an empty cell | the cell you divide by |
| #VALUE! | text where a number is needed | cells that look like numbers but sit on the left |
| #NAME? | misspelled function, or text without quote marks | spelling and quotes |
| #REF! | a reference to a cell that no longer exists | deleted rows, or copies off the edge |
| #N/A | a lookup found nothing | the value you are searching for |
| #### | the column is too narrow for the number | widen the column |
2Problem
An error flows on
C2 shows #DIV/0!, and D2 holds =C2*2. What does D2 show?
Hint
D2 uses C2.
Solution
Answer: #DIV/0!
An error passes along to every formula that uses it.
3Explain
#DIV/0!, #VALUE! and #NAME?
#DIV/0! appears when something is divided by zero. An empty cell counts as zero in arithmetic, so a sales-per-day formula shows #DIV/0! until someone fills in the number of days. #VALUE! means a calculation met text it could not turn into a number, as in the previous unit's chain of + signs. #NAME? is usually a typing problem. Microsoft's IF page says it usually means a misspelled function name, and its VLOOKUP page says it usually means text without quote marks: =SUMM(A1:A3) and =IF(A1>5,Yes,"No") both show it.
4Problem
Divided by an empty cell
A2 holds 600 and B2 is empty. What does =A2/B2 show?
Hint
An empty cell counts as 0.
Solution
Answer: #DIV/0!
An empty cell counts as 0 in arithmetic, and dividing by 0 is not possible.
5Problem
=SUMM
What does =SUMM(A1:A3) show?
Hint
There is no function called SUMM.
Solution
Answer: #NAME?
There is no function called SUMM, so the name is unknown.
6Problem
A number plus text
B4 holds the text ten. What does =A2+B4 show?
Hint
ten is a word, not a number.
Solution
Answer: #VALUE!
+ needs a number, and "ten" cannot be turned into one.
7Explore
Dividing by zero in JavaScript
JavaScript gives Infinity where a spreadsheet shows #DIV/0!. Neither is a useful sales figure; the missing input is the problem.
const sales = 600;
const days = 0;
console.log(sales / days);Infinity8Explain
#REF!, #N/A and ####
#REF! means a formula points at a cell that is gone. Deleting a row that a formula used is the classic cause; copying a relative reference off the top or left edge is another, as the previous unit showed. #N/A comes from lookup functions such as VLOOKUP when the value is not found, and the next course covers it. Finally, a cell full of #### is not an error at all. Microsoft's operator page notes that # is also used to show there is not enough space to display a value: widen the column and the number appears.
9Problem
A deleted row
You delete a row that a formula used. Which error appears?
Hint
The reference points at nothing.
Solution
Answer: #REF!
The reference points at a cell that no longer exists.
10Problem
A lookup that found nothing
Which error usually means a lookup found nothing?
Hint
Not available.
Solution
Answer: #N/A
#N/A means a value is not available, for example not found by VLOOKUP.
11Problem
########
A cell shows ######## after you type a long number. What should you do?
Hint
The number does not fit.
Solution
Answer: Widen the column
#### means there is not enough room to show the value.
12Explain
Where Excel and Google Sheets behave differently
Two situations are handled differently by the two programs. If you type a formula that cannot be read, such as a missing bracket in =SUM(A1:A3, Excel refuses to accept it and shows a message explaining the problem. Google Sheets accepts the entry and shows #ERROR! in the cell, with the note Formula parse error. The second case is a circular reference, a formula that depends on its own cell, such as =A1+1 typed into A1. Microsoft says Excel shows a warning the first time and then 0 or the last calculated value.
13Problem
A missing bracket in Sheets
You type =SUM(A1:A3 with the bracket missing. What does Google Sheets do?
Hint
Sheets accepts the entry.
Solution
Answer: Shows #ERROR! (formula parse error)
Sheets shows #ERROR!; Excel is the one that refuses the entry with a message.
14Problem
=A1+1 in A1
A1 holds =A1+1. What does Excel do?
Hint
The formula refers to itself.
Solution
Answer: Warns about a circular reference, then shows 0 or the last value
The formula needs its own result before it can calculate, creating a circular dependency rather than an ordinary forward calculation.
15Explain
Follow the references back
This lab follows Google Sheets in both cases so that you can see the problem in the cell, and the panel explains what Excel would do. When you meet an error, select the cell, read the formula in the formula bar, and follow the references back until you find the first cell where the error starts. Fix that one cell and the errors downstream usually disappear together.
16Problem
A column of #VALUE!
A column of totals is full of #VALUE!. What is the best first step?
Hint
Find where it starts.
Solution
Answer: Follow the references back to the first cell with the error
One bad cell usually causes the whole chain; fixing it clears the rest.
17Explore
Practice in the grid
After repairing an error, check whether the replacement input makes sense, not merely whether the error message disappeared. Filling a missing divisor with an arbitrary number can produce a neat result that has no useful meaning. Read the input’s label and restore the intended value. Then inspect the dependent results again. A sheet without visible error messages is not automatically correct; repairing the cause includes checking the meaning of the data used by the calculation.
Drag to turn. Scroll or pinch to zoom.
18Practice
Sales per day with a guard
Finish perDay(sales, days) so that it returns "#DIV/0!" when days is 0 or empty (null), "#VALUE!" when days is text, and sales ÷ days otherwise.
120
#DIV/0!
#DIV/0!
#VALUE!function perDay(sales, days) {
return sales / days;
}
console.log(perDay(600, 5));
console.log(perDay(600, 0));
console.log(perDay(600, null));
console.log(perDay(600, "ten"));
Hint
An empty cell counts as 0, so null needs the same answer as 0.
A solution
function perDay(sales, days) {
if (typeof days === "string") return "#VALUE!";
if (days === 0 || days === null) return "#DIV/0!";
return sales / days;
}
console.log(perDay(600, 5));
console.log(perDay(600, 0));
console.log(perDay(600, null));
console.log(perDay(600, "ten"));19
Summary
- #DIV/0! divide by 0 · #VALUE! text in a calculation · #NAME? spelling or missing quotes · #REF! missing cell · #N/A not found.
- #### only means the column is too narrow.
- Errors pass along to every formula that uses them; fix the first one.
- Unreadable formula: Excel refuses it, Google Sheets shows #ERROR!. Circular reference: Excel warns and shows 0, Google Sheets shows #REF!.