Formula Errors

Fix Dynamic SUM Formulas with INDIRECT and Named Ranges in Excel

Bushra ParveenBushra Parveen Dec 2, 2026 868 views

Question details

Correct a dynamic SUM formula that uses INDIRECT and COUNT, and find an alternative that can be used in a named range.

Fix Dynamic SUM Formulas with INDIRECT and Named Ranges in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants to sum from E82 through a last row calculated from the numeric entries in E83:E116.
Observed behavior
The existing formula produces a #VALUE! error instead of returning the dynamic sum.
Before you start

Check that the numeric data in E83:E116 is contiguous, with no blank or text cells between entries. COUNT counts numeric cells, so gaps can make the calculated endpoint fall before the last value.

Solution 1Recommended

Correct the INDIRECT row reference

Use this approach to fix the formula while keeping INDIRECT.

1
Edit the formula

Select the cell containing the formula and enter =SUM(E82:INDIRECT("E"&82+COUNT(E83:E116))).

2
Check the result

Press Enter and compare the sum with the values starting at E82. Add a numeric value immediately after the existing contiguous data to verify that the sum expands.

Correct the INDIRECT row reference
How the reference is built: The formula combines the text E with the calculated row number to create a reference such as E85. Do not put quotation marks around the numeric row calculation.
WPS Spreadsheets

Create a Dynamic SUM Formula in WPS Spreadsheets

Use WPS Spreadsheets to sum a contiguous set of values with an INDEX-based dynamic range, then save the workbook in an Excel-compatible format.

  1. 1. Open the workbook: Open WPS Spreadsheets and select Open to load your Excel workbook.
  2. 2. Enter the formula: Select the result cell and enter =SUM(E82:INDEX(E:E,82+COUNT(E83:E116))).
  3. 3. Verify the sum: Press Enter and check the result against the contiguous numeric values in E82:E116.
  4. 4. Save the workbook: Select Menu > Save As and choose an Excel workbook format such as XLSX.
Create a dynamic SUM range without INDIRECTOpen and save Microsoft Excel XLSX workbooksWork with formulas in a familiar spreadsheet interfaceUse a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does the INDIRECT formula need the column letter in quotes?

INDIRECT converts text into a cell reference. In INDIRECT("E"&82+COUNT(E83:E116)), "E" supplies the column letter and the numeric calculation supplies the row number.

What happens if there are blanks in E83:E116?

COUNT ignores blanks, so 82+COUNT(E83:E116) may point to a row before the last numeric entry. The examples work as intended when the numeric entries after E82 are contiguous.

Why use INDEX instead of INDIRECT?

INDEX can return the endpoint of the SUM range without using volatile INDIRECT. Enter =SUM(E82:INDEX(E:E,82+COUNT(E83:E116))) in the result cell.

How can I reuse the dynamic range in other formulas?

In Excel, open Formulas > Name Manager > New and define a name using the INDEX-based range expression. You can then use that name in a formula such as =SUM(SalesData).