How to Sum a Dynamic Excel Range Using Start and End Row Numbers
Question details
The user needs to dynamically calculate the sum of a specific column range by referencing start and end row numbers defined in separate cells.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating a flexible calculation where the summation range updates automatically based on user-input row parameters.
- Observed behavior
- To output the total sum of a range (e.g., C5:C37) directly governed by the integer values typed into A1 (5) and A2 (37).
Ensure that the start row number entered in your first cell is strictly less than or equal to the end row number in the second cell to prevent calculation errors.
Use the INDEX Function for Non-Volatile Dynamic Summation
The most efficient way to sum a dynamic range is by combining the SUM and INDEX functions. This non-volatile approach ensures your workbook remains fast and responsive.
Using INDEX within a SUM formula creates a robust cell reference range. Because INDEX is a non-volatile function, it only recalculates when the specific source data changes, which is highly recommended for large spreadsheets.
Type your start row number in cell A1 and your end row number in cell A2.
Select the cell where you want the total sum to appear and enter the formula: =SUM(INDEX(C:C,A1):INDEX(C:C,A2))
Press Enter to calculate the sum. The range in column C will update automatically whenever you change the numbers in A1 and A2.

Use the INDIRECT Function to Build Reference Strings
You can also use the INDIRECT function to concatenate text strings and row numbers into a valid cell reference.
Calculate Dynamic Ranges Effortlessly in WPS Spreadsheet
WPS Spreadsheet fully supports advanced array referencing and non-volatile formulas like INDEX. You can seamlessly calculate dynamic ranges using cell references while maintaining excellent performance on large datasets, all within an intuitive workspace.
- 1. Open your file: Launch WPS Office and open your spreadsheet document.
- 2. Set range parameters: Ensure your dynamic start and end row numbers are typed into your designated reference cells (e.g., A1 and A2).
- 3. Apply the efficient formula: In your result cell, input the formula =SUM(INDEX(C:C,A1):INDEX(C:C,A2)) and press Enter to instantly see your dynamic total.

Frequently Asked Questions
What happens if my start row number is greater than the end row number?
If the start row reference is greater than the end row, the SUM function will evaluate an invalid range, returning an error or resulting in zero. Always validate that the start row number is smaller than the end row number.
Can I sum across multiple columns dynamically using the INDEX method?
Yes, you can modify the INDEX formula to include column references as well. A structure like =SUM(INDEX(A:Z, A1, B1):INDEX(A:Z, A2, B2)) allows you to specify dynamic columns alongside dynamic rows, where B1 and B2 contain the start and end column numbers.
Why does my INDIRECT formula return a #REF! error?
A #REF! error with the INDIRECT function usually indicates that the concatenated text string did not evaluate to a valid cell reference. Double-check that the row numbers in your reference cells don't result in an out-of-bounds row, such as row 0 or a row exceeding the spreadsheet's maximum limit.
What is the key difference between volatile and non-volatile functions in Excel calculations?
Volatile functions (like INDIRECT, OFFSET, and TODAY) recalculate every single time any change happens anywhere in the workbook, which can heavily slow down overall performance. Non-volatile functions (like INDEX) are much more efficient as they only recalculate when their specific precedent source data is altered.




