Yes, you can repeat a formula in Excel by dragging the fill handle or using keyboard shortcuts like Ctrl+E to auto-fill adjacent cells. This repeats the calculation logic across a range of data without retyping the formula, which speeds up data entry and ensures consistency across your spreadsheet.
What You'll Need
- A computer with Microsoft Excel installed (Windows, Mac, or Web version).
- At least two adjacent cells with data to perform a calculation on.
- A basic understanding of cell references (relative, absolute, and mixed).
Step-by-Step
- Select the cell containing the formula you want to repeat. Click on the cell at the bottom or end of the data series where the result of the first calculation is displayed.
- Locate the fill handle. Move your mouse cursor over the small square in the bottom-right corner of the selected cell border. The cursor will change from a white cross to a thin black plus sign (+).
- Drag the fill handle. Click and hold the left mouse button on the fill handle. Drag the cursor down (if you have data below) or to the right (if you have data to the side). As you drag, a small tooltip will show the value or formula being filled into the adjacent cells.
- Release the mouse button. Once you have dragged the handle to cover all the cells where you want the formula repeated, release the button. Excel will automatically calculate the formula for each cell, using relative references to adjust the cell numbers (e.g., B2, B3, B4).
Using Keyboard Shortcuts
Instead of dragging the mouse, you can use a fast keyboard shortcut to apply the same formula to a range of cells.
- Enter your formula into the starting cell. Ensure the formula is correct and returns the desired result in the first cell.
- Double-click the fill handle. Instead of dragging, simply double-click the small black square in the bottom-right corner of the active cell. Excel will automatically detect the range of data adjacent to the current column and fill the formula down to the last row of data. This is the most efficient method for lists of varying lengths.
Using AutoFill (Ctrl+E)
Excel includes an intelligent fill feature that can often guess the pattern of your data, including repeating formulas.
- Enter your formula in the first cell. Type the formula and press Enter.
- Select the cell again. Click back on the cell containing the formula to ensure it is the active, selected cell.
- Press Ctrl+E. Hold down the Control key on Windows or the Command key on Mac, and press E. Excel will scan the cells above and to the left to identify the logic of your formula and apply it to the remaining cells in the column. This is particularly useful for formatting or text-based formulas.
Common Mistakes
- Incorrect Cell References. The most common error is using absolute references (e.g.,
$A$1) when a relative reference (e.g.,A1) is required. If you want the formula to change for every cell, ensure the dollar signs are not present. If you want a specific cell to stay constant, add the dollar signs. - Dragging from the Wrong Direction. If you have data to the left and below the formula, dragging the fill handle in the wrong direction can cause errors. Always ensure the direction of the drag matches the direction of your data.
- Ignoring Data Types. Ensure the cells you are filling into are formatted correctly. If you are summing numbers but the target cells are formatted as text, the result will be text (e.g., "100" instead of the number 100).
Tips
- Name Ranges for Clarity. Instead of typing cell addresses like
B2andB3repeatedly, define named ranges for your data. This makes your formulas easier to read and less prone to errors when repeating them. - Use Mixed References. If you are creating a matrix or a table where you want to repeat a formula across columns but keep a specific row constant, use mixed references. For example,
$A2keeps the column A fixed while allowing the row number to change, andA$2keeps the row 2 fixed while allowing the column to change. - Check the Fill Options. After dragging, you will see a small icon appear next to the last filled cell. Clicking this icon allows you to choose how the fill is applied: Copy Cells, Fill Formatting Only, or Fill Without Formatting.
Troubleshooting
If the formula is not repeating correctly or is returning errors, check the following common issues.
The Formula is Not Extending
If dragging the fill handle does not extend the formula, ensure that the adjacent cells are not empty. Excel will stop filling if it encounters an empty cell, assuming you do not want to continue the pattern. You can also try dragging a larger distance to see if the tooltip appears, or check that the cell is not locked or protected.
Reference Error (e.g., #REF!)
A #REF! error usually indicates that the formula is referencing a cell that does not exist. This often happens if you delete a column or row that the formula depends on before repeating it, or if you drag the formula into a range that is too large for the existing data.
Values are Not Updating
If the formula is present but the values are not changing when you edit the source data, ensure the calculation is set to automatic. Go to the Formulas tab and ensure Automatic is selected in the Calculation Options group. If it is set to Manual, you will need to press F9 to update the values.
The Formula is Repeating Incorrectly
If the formula repeats but the math is wrong, you likely have the wrong type of reference. For example, if you are calculating the sum of a column but the formula repeats the sum of the entire column for every row, you are using an absolute reference. Remove the dollar signs to fix this.
Frequently Asked Questions
What is the difference between relative and absolute references?
A relative reference (e.g., A1) changes when you copy the formula to another cell. If you copy the formula from row 1 to row 2, it changes to A2. An absolute reference (e.g., $A$1) stays the same regardless of where you copy the formula. Mixed references (e.g., $A1 or A$1) lock either the row or the column.
Why does Excel stop filling my formula?
Excel stops filling when it encounters an empty cell in the adjacent range, or when it detects a change in the data pattern that it cannot easily replicate. You can force it to continue by dragging further or by selecting the entire range you want filled first and then entering the formula.
Can I repeat a formula down a whole column automatically?
Yes, double-clicking the fill handle is the fastest way to repeat a formula down an entire column. It will fill down until it hits the last row of data in the adjacent column. For a whole sheet, you can use the shortcut Ctrl+A to select all cells and then press Ctrl+E.
How do I repeat a formula to the right instead of down?
To repeat a formula to the right, select the cell with the formula and drag the fill handle to the right. You can also use the shortcut Ctrl+D (Fill Down) if you want to copy the formula from a cell above into the selected cells, or Ctrl+R (Fill Right) if you want to copy from the cell to the left.
Why is my filled formula showing a different result than the original?
This is usually due to incorrect cell referencing. If the original formula uses a specific cell (e.g., B2) and you want that cell to be included in every calculation, you do not need to change anything. If you want the formula to calculate against different data points (e.g., B3, B4, B5), ensure you are using relative references and not absolute ones.