VLOOKUP not working? 9 causes and how to fix each one
VLOOKUP returning #N/A even though the values match, the wrong value, or breaking when you drag it down? The 9 usual causes and the exact fix for each.
Fix a total that comes out wrong.
Find what SUM is missing or counting twice, then change the formula to deal with it.
The total in E1 is too small: one amount is stored as text. Write a total in E2 that counts it, without changing column B.
Typing formulas is easiest on a computer with a keyboard.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Item | Amount | Given total | 985 | ||
| 2 | Monitor Stand | 85 | Correct total | |||
| 3 | Headset | 230 | ||||
| 4 | Office Chair | 45 | ||||
| 5 | Bookshelf | 190 | ||||
| 6 | USB-C Hub | 350 | ||||
| 7 | Notebook A5 | 140 | ||||
| 8 | Filing Cabinet | 100 | ||||
| 9 | Desk Organiser | 35 | ||||
| 10 | ||||||
| 11 | ||||||
| 12 | ||||||
| 13 |
Excel only adds up what you point it at. If the range or the data is wrong, you get a confident, wrong number. Three causes cover most broken totals.
Click the total and look at the coloured outline. Rows added under the range, or a range typed by hand, are left out. Fix it with a range that covers every row, or turn the list into an Excel table (Ctrl+T) so totals grow with it.
Text numbers sit on the left of the cell and SUM skips them. =SUM(VALUE(B2:B9)) counts them without touching the data, or fix the column itself with VALUE in a helper column. In Excel 2019 and older, use =SUMPRODUCT(VALUE(B2:B9)) instead (or press Ctrl+Shift+Enter).
A column with subtotals in it adds each item twice if you SUM the lot. Skip the subtotal rows by their label:
=SUMIF(A2:A11,
Or add up only the subtotals. Excel's SUBTOTAL(9,...) also ignores other SUBTOTAL formulas in its range.
Select the cells: the status bar at the bottom of Excel (and of the grid here) shows their Sum and Count. If Count is higher than Numerical Count (right-click the status bar to show it), some cells hold text. Totals of lookups have their own traps: see SUM with VLOOKUP.
VLOOKUP returning #N/A even though the values match, the wrong value, or breaking when you drag it down? The 9 usual causes and the exact fix for each.
Know someone fighting with a spreadsheet? Send them this page.