How to Create a Dynamic Excel SUM Formula Using a Column Letter
Question details
The user needs to construct a dynamic SUM formula that sums a specific row range (rows 1 through 10) of a target column, where the target column's letter is dynamically provided by another cell (e.g., cell A9).

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Using a list box or a reference cell to input a variable column letter, and wanting the spreadsheet to automatically calculate the sum of a fixed number of rows within that specific column.
- Observed behavior
- The goal is to have the SUM function automatically construct and update its target range (such as G1:G10 or J1:J10) based purely on the text value present in the reference cell.
Ensure that your reference cell contains a valid alphabetical column letter without any leading or trailing spaces, and that the target rows in your dataset contain the numeric values you intend to sum.
Use the INDIRECT Function to Build the Dynamic Range
The INDIRECT function converts a concatenated text string into a valid cell reference, allowing you to dynamically piece together the column letter and row numbers for the SUM formula.
By joining the text value from your reference cell (the column letter) with the hardcoded starting and ending row numbers, you create a text string that looks like a range reference. The INDIRECT function reads this text string and translates it into an actual range that the SUM function can calculate.
Click on the cell where you want the dynamic sum total to be displayed.
Type the formula =SUM(INDIRECT(A9&"1:"&A9&"10")) into the formula bar. If your list box or column letter reference is in a cell other than A9, replace both instances of 'A9' with your actual reference cell.
Press Enter to execute the formula. If cell A9 contains the letter 'G', the formula resolves to =SUM(G1:G10) and sums that specific range.

Use WPS Spreadsheet for Advanced Dynamic Formulas
WPS Spreadsheet fully supports advanced functional logic, including INDIRECT, OFFSET, and dynamic array calculations. It makes managing form controls, list boxes, and complex formulas straightforward and highly efficient.
- 1. Open WPS Spreadsheet: Launch WPS Office and open your existing spreadsheet or create a new one.
- 2. Set Up Your Reference Cell: Type a column letter (e.g., G) into cell A9, or use Data Validation to create a dropdown list of valid column letters.
- 3. Apply the Dynamic Formula: In your total cell, enter =SUM(INDIRECT(A9&"1:"&A9&"10")) and press Enter to complete the dynamic calculation.

Frequently Asked Questions
What happens if the reference cell containing the column letter is left blank?
If the reference cell (A9) is blank, the INDIRECT function tries to evaluate an incomplete string like "1:10" without a column letter. This will result in a #REF! error. To handle this gracefully, you can wrap your formula in an IFERROR function, such as =IFERROR(SUM(INDIRECT(A9&"1:"&A9&"10")), 0).
Can I also make the row numbers dynamic instead of hardcoding 1 and 10?
Yes. If you have the starting row number in cell B1 and the ending row number in cell B2, you can adjust the formula to concatenate those references as well: =SUM(INDIRECT(A9&B1&":"&A9&B2)).
Does using the INDIRECT function slow down my spreadsheet?
INDIRECT is known as a 'volatile' function, meaning it recalculates every time any change is made anywhere in the workbook. In small to medium-sized spreadsheets, you will not notice a difference, but excessive use in large workbooks with massive datasets can impact calculation performance.




