Formula Errors

How to Sum VLOOKUP Results Across Multiple Sheets Without #N/A Errors

Amos GikundaAmos Gikunda Oct 26, 2026 868 views

Question details

The user wants to sum lookup values across multiple worksheets but encounters #N/A errors when a value is missing in one or more sheets. They need missing values to be treated as zero to get an accurate total.

How to Sum Lookup Results Across Multiple Sheets Without #N/A Errors
Product
WPS Spreadsheet
Device & OS
not provided
Scenario
Consolidating matched data across multiple worksheets where some lookup values might not exist on every sheet.
Observed behavior
Combining VLOOKUP inside a SUM function returns an #N/A error if the lookup value is missing from any of the referenced sheets, causing the entire total to fail.
Before you start

Ensure all referenced worksheet names are spelled correctly and that your lookup ranges (columns) are consistent across all worksheets before applying these formulas.

Solution 1Recommended

Replace VLOOKUP with SUMIF for Individual Sheets

Since the SUMIF function naturally returns 0 instead of an #N/A error when a value is missing, adding multiple SUMIFs prevents the calculation from breaking.

VLOOKUP is designed to return exactly what it finds, and if it finds nothing, it throws an error. SUMIF, on the other hand, adds up values that meet a condition. If the condition isn't met (the value isn't there), it simply adds zero.

1
Select the summary cell

Click on the cell in your main sheet where you want the combined total to appear.

2
Enter the first SUMIF formula

Type =SUMIF('Sheet1'!$A$1:$A$10, A8, 'Sheet1'!$B$1:$B$10) replacing 'Sheet1' with your actual first sheet name, A8 with your lookup value, and the ranges with your actual data ranges.

3
Add subsequent sheets

Type a plus sign (+) at the end of the formula and add the next sheet's SUMIF: +SUMIF('Sheet2'!$A$1:$A$10, A8, 'Sheet2'!$B$1:$B$10).

4
Apply the formula

Press Enter to calculate. You can now drag the fill handle down to copy this formula safely for other lookup values without risking #N/A errors.

Replace VLOOKUP with SUMIF for Individual Sheets
Tip: Using absolute references (like $A$1:$A$10) ensures your lookup ranges don't shift when you copy the formula down.
Advanced Data Analysis

Easily Manage Multi-Sheet Formulas in WPS Spreadsheet

WPS Spreadsheet provides robust formula support, including advanced functions like SUMIF, SUMPRODUCT, and INDIRECT. It allows you to effortlessly consolidate data across multiple worksheets with a highly intuitive interface.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your multiple worksheets.
  2. 2. Navigate to the summary sheet: Go to the main sheet where you need to combine the lookup totals.
  3. 3. Apply the SUMIF formula: Type the SUMIF or SUMPRODUCT formula exactly as you would in standard spreadsheet software.
  4. 4. Drag to fill: Use the fill handle to apply the formula to the rest of your dataset, calculating totals flawlessly.
100% format and formula compatibility with Microsoft Excel (.xlsx) files.Fast and lightweight performance, even when processing arrays across hundreds of worksheets.Built-in error checking to instantly identify and troubleshoot #N/A and #REF! formula errors.
microsoft office alternative - wps office

Frequently Asked Questions

Why does VLOOKUP inside a SUM formula return #N/A?

If VLOOKUP cannot find an exact match in one of the sheets, it inherently returns an #N/A error. When the SUM function attempts to add an #N/A error to standard numbers, it cannot process the math, causing the entire final result to become #N/A.

Can I use IFERROR with VLOOKUP instead of SUMIF?

Yes, you can wrap your VLOOKUPs like this: =IFERROR(VLOOKUP(...), 0) + IFERROR(VLOOKUP(...), 0). This forces the error to become a zero. However, using SUMIF is widely considered more elegant and efficient because it natively returns zero for missing values without requiring an extra nested function.

What does the INDIRECT function do in the SUMPRODUCT formula?

The INDIRECT function takes a text string (like the sheet names you listed in cells K4:K11) and converts it into a valid cell reference that the spreadsheet engine can understand. This allows the SUMIF formula to dynamically look up data across multiple sheets without you needing to manually type out each sheet's name in the formula bar.