Create a Formula from Selected Cell Values in Excel
Question details
The user wants to create a formula using values from selected Excel cells.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user has selected cells and wants to calculate a result from their values.
- Observed behavior
- The desired formula depends on the operation, such as addition, multiplication, or averaging, and the location of the cells.
Identify the cells to include and decide whether you need a sum, average, product, or another calculation. Choose an empty cell outside the input range for the result.
Enter a Formula for the Desired Operation
Use a function when you know which calculation to apply to the selected values.
Excel cannot determine the intended operation from an arbitrary selection alone. Replace A1:A10 in these examples with your actual cell range.
Click an empty cell outside the range containing your values.
Type =SUM(A1:A10) to add the values, =AVERAGE(A1:A10) to calculate their average, or =PRODUCT(A1:A10) to multiply them.
Press Enter. Excel displays the result and recalculates it when the referenced values change.

Use AutoSum for a Quick Total
Use AutoSum when you want to add a nearby range without typing the full formula.
Create Formulas from Cell Values in WPS Spreadsheets
Use WPS Spreadsheets to calculate a sum, average, or product from selected cells by entering the corresponding formula in a result cell.
- 1. Open the spreadsheet: Open WPS Spreadsheets and select File > Open to choose your workbook.
- 2. Choose a result cell: Click an empty cell outside the cells you want to calculate.
- 3. Enter the formula: Type =SUM(A1:A10), =AVERAGE(A1:A10), or =PRODUCT(A1:A10), replacing the example range with your cells.
- 4. Show the result: Press Enter to calculate the formula, then use File > Save to save your changes.

Frequently Asked Questions
Can Excel automatically choose a formula from selected cells?
Excel needs to know the intended operation. Choose a function such as SUM, AVERAGE, or PRODUCT, or use Home > AutoSum when you want a total.
How do I add cells that are not next to each other?
In an empty result cell, enter a formula such as =SUM(A1,C1,E1) and press Enter. The argument separator may vary with your regional settings.
How do I multiply values in a range?
Click an empty cell, enter =PRODUCT(A1:A10) using your actual range, and press Enter.
Will the formula update if I change an input value?
Yes. A formula that references cells normally recalculates when their values change. If it does not, check that calculation is set to Automatic under Excel's Formulas > Calculation Options.




