Function Problems

How to Create a Dynamic Excel SUM Formula Using a Column Letter

Ayan MasoodAyan Masood Nov 2, 2026 870 views

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

How to Create a Dynamic Excel SUM Formula Using a Column Letter
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the result cell

Click on the cell where you want the dynamic sum total to be displayed.

2
Enter the dynamic formula

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.

3
Calculate the result

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 the INDIRECT Function to Build the Dynamic Range
Formula Breakdown: The ampersand (&) operator glues the text together. The expression A9&"1:"&A9&"10" dynamically produces the string "G1:G10", which INDIRECT then turns into a mathematical reference.
Smart Formula Management

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. 1. Open WPS Spreadsheet: Launch WPS Office and open your existing spreadsheet or create a new one.
  2. 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. 3. Apply the Dynamic Formula: In your total cell, enter =SUM(INDIRECT(A9&"1:"&A9&"10")) and press Enter to complete the dynamic calculation.
100% compatible with Microsoft Excel formulas, ensuring your INDIRECT and SUM functions work immediately.Lightweight software architecture that calculates complex, volatile formulas smoothly.Built-in form controls like list boxes and data validation to easily manage column letter inputs.
microsoft office alternative - wps office

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.