Fix Dynamic SUM Formulas with INDIRECT and Named Ranges in Excel
Question details
Correct a dynamic SUM formula that uses INDIRECT and COUNT, and find an alternative that can be used in a named range.

- 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.
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.
Correct the INDIRECT row reference
Use this approach to fix the formula while keeping INDIRECT.
Select the cell containing the formula and enter =SUM(E82:INDIRECT("E"&82+COUNT(E83:E116))).
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.

Use INDEX and define a dynamic named range
Use INDEX instead of INDIRECT to avoid a volatile INDIRECT reference and optionally reuse the range by name.
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. Open the workbook: Open WPS Spreadsheets and select Open to load your Excel workbook.
- 2. Enter the formula: Select the result cell and enter =SUM(E82:INDEX(E:E,82+COUNT(E83:E116))).
- 3. Verify the sum: Press Enter and check the result against the contiguous numeric values in E82:E116.
- 4. Save the workbook: Select Menu > Save As and choose an Excel workbook format such as XLSX.

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).




