This is the sample dataset.
Method 1 – Utilize Copy and Paste Command
Steps:
- Enter the formula in E5.
=SUM(C5:D5)
- Press Enter to see the result.
- Select E5 and right-click.
- Choose Copy. You can also press Ctrl + C.
- Select E6:E10 to see the result.
- Right-click the selected cell range and select Paste. You can also press Ctrl + V .
This is the output.
Read More: How to Copy Exact Formula in Excel
Method 2 – Using Keyboard Shortcuts
2.1 Press CTRL + Enter
Steps:
- Select E5:E10.
- E5 becomes the active cell.
- Enter the formula in E5.
=SUM(C5:D5)
- Press Ctrl + Enter to copy the formula to the whole data range.
2.2 Press CTRL + D
Steps:
- Enter the formula in E5.
- Select E5:E10 and press Ctrl + D.
This will copy the formula to the lower cells.
Read More: How to Copy Formula Down with Shortcut in Excel
Method 3 – Using the AutoFill Feature
Steps:
- Enter the formula in E5.
You will see a plus sign at the bottom right corner of the cell.
- Drag the plus sign to the lower cells to fill them with the formula.
Read More: How to Copy a Formula in Excel with Changing Cell References
Method 4 – Copying the SUM Formula to Non-Adjacent Cells
Steps:
- Enter the formula in E5.
- Press Enter to see the result.
- Select E5 and right-click.
- Choose Copy.
- Press Ctrl and left-click to select cells.
- Right-click and press Paste.
- This will copy the formula into non-adjacent cells.
Read More: How to Copy a Formula in Excel Without Changing Cell References
Method 5 – Insert an Excel Table to Copy the SUM Formula
Steps:
- Select B5:E10.
- Go to the Insert tab and in Tables, select Table.
- Enter data in the Create Table dialog box and click OK.
- Enter the formula in E5.
=SUM(Table1[@[Marks in Part 1]:[Marks in Part 2]])
- Press Enter.
This will automatically fill E5:E10 with the formula.
Read More: How to Copy a Formula across Multiple Rows in Excel
Method 6 – Running a VBA Code
Steps:
- Insert a result column beside the primary data set.
- Go to the Developer tab.
- In Code, select Visual Basic.
- In Insert, select Module.
- Copy the following code into the module.
Sub Copy_SUM_Formula()
Range("E5").Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-2]:RC[-1])"
Range("E5").Select
Selection.AutoFill Destination:=Range("E5:E10"), Type:=xlFillDefault
Range("E5:E10").Select
End Sub
VBA Breakdown
- names the sub-procedure.
Sub Copy_SUM_Formula()
- selects a cell and applies the SUM
Range("E5").Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-2]:RC[-1])"
- AutoFills the formula in the lower cell range.
Range("E5").Select
Selection.AutoFill Destination:=Range("E5:E10"), Type:=xlFillDefault
Range("E5:E10").Select
- Save the code and press F5 or click Run to run the code.
This is the output.
Read More: How to Copy Formula to Entire Column in Excel
Download Practice Workbook
Download the free Excel workbook here.
Related Articles
- Creating and Copying Formula Using Relative References in Excel
- How to Copy Formula in Excel to Change One Cell Reference Only
<< Go Back to Copy Formula in Excel | Excel Formulas | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!