How to Replicate a Formula in Excel
In this article
You replicate a formula in Excel by using relative cell references (the default, like A1) and dragging or copying the formula to new cells so Excel adjusts the row and column positions for you each time. Put simply: write the formula once in the top cell, grab the small green square in its bottom-right corner (the fill handle), and drag down or across, or copy the cell with Ctrl+C and paste it with Ctrl+V. Excel shifts the references automatically, so =A2*B2 becomes =A3*B3 in the next row. Use dollar signs ($) on any reference you want to stay fixed, such as a tax rate stored in one cell. The rest of this guide covers the methods, how to control which parts move, and how to fix the usual snags. Menu labels and shortcuts can vary slightly by Excel version, platform and region.
What You'll Need
- A spreadsheet with at least one working formula already entered in a cell (or the confidence to type one, e.g.
=A2*B2). - Cells below or beside it that should hold the same formula applied to different rows or columns.
- Excel for Windows, Mac, or Excel for the web, or the Excel mobile app for basic copy and paste. Dragging the fill handle is easier with a mouse; on mobile, copy and paste is the practical route.
- A clear idea of whether any cell reference must stay fixed across every copy. If so, you will add
$signs before copying. - Optional: a backup copy of the workbook (File > Save As) before you overwrite a large block of cells.
Step-by-Step
- Click the cell containing the formula you want to reuse. It should contain something like
=A2*B2or=SUM(B2:B10). Check the formula bar at the top of the window to confirm what is actually in the cell rather than trusting what you see displayed. - Decide what must stay fixed. By default every reference is relative and will shift as you copy. If a reference points to a single constant cell, such as a sales tax rate in
E1, edit that reference to$E$1before copying. Press F4 on Windows (Fn+F4 on many Mac keyboards, or Cmd+T in some Mac setups) with the cursor on the reference to cycle through$E$1,E$1and$E1. - Confirm the formula is correct in the first cell. Press Enter and check the result makes sense. It is much easier to fix one formula than a hundred copies of a wrong one.
- Select the formula cell and copy it. Press Ctrl+C (Cmd+C on Mac). Excel shows a moving dashed border around the cell.
- Select the destination range. Click the next cell and drag down to cover every row that needs the formula, or hold Shift and click the last cell. You can also select a block of rows and columns if you are filling a grid.
- Paste with Ctrl+V (Cmd+V on Mac). Excel pastes the formula into every selected cell, adjusting relative references row by row. Press Esc to clear the dashed border.
- Alternatively, drag the fill handle. Select the formula cell, hover over the small square at its bottom-right corner until the pointer becomes a thin black cross, then drag down or across. Release the mouse and the formula fills the range. Double-clicking the fill handle fills down automatically to match the length of the adjacent data column.
- Check a few results. Click a cell near the bottom of the filled range and read the formula bar. If your original was
=A2*B2, the copy five rows down should read=A7*B7. That shift is the sign replication worked. - Save the workbook with Ctrl+S (Cmd+S on Mac) once the results look right.
Common Mistakes
Forgetting the dollar signs. The most frequent error is copying a formula that references a fixed cell, such as a tax rate, without locking it. Every copy then points one row further down or one column further across until it references empty cells and returns zero or an error. Lock the reference first, then copy.
Pasting values instead of the formula. If you use Paste Special and choose Values, the result is copied as a static number; changing the source data will no longer update it. For a live formula you want the standard paste, not Paste Special > Values.
Dragging over the wrong range. Releasing the fill handle too early or too late skips cells or overwrites data below the intended range. Undo a bad fill with Ctrl+Z (Cmd+Z on Mac) immediately.
Inconsistent ranges inside functions. A formula like =SUM(B2:B10) copied down will shift its whole range unless the range is anchored with dollar signs, e.g. =SUM($B$2:$B$10). Mixed anchoring (B$2:B$10) fixes only rows. Decide deliberately which parts should move.
Copying into a filtered or hidden worksheet area. Pasting into filtered rows or across hidden columns can put formulas in cells you cannot see, producing confusing results later. Clear filters before filling.
Expecting formatting to copy cleanly. A normal paste carries formatting along with the formula. If you only want the formula, use Paste Special and choose Formulas.
Tips
- Use the fill handle with the mouse for short runs, and copy/paste for thousands of rows, which is faster and more reliable.
- Name key input cells (Formulas tab > Define Name) and reference them by name, e.g.
=A2*TaxRate. Named references stay fixed and are easier to read than dollar signs. - Convert a range to an Excel Table (Insert > Table) and formulas entered in one row fill down automatically as you add rows, without any copying.
- After filling a large range, press Ctrl+` (the key left of 1, on many keyboards) to toggle showing formulas instead of results, and scan the whole block for anomalies. Press it again to switch back.
- Keep one formula per column where possible. If two adjacent cells in the same column have different formulas, one of them was almost certainly replicated incorrectly.
- On mobile, select the cell, use the copy option in the context menu, then select the target cells and paste. The fill handle is harder to hit precisely on a touchscreen, so copy and paste is the safer choice.
Troubleshooting
The copies show the same value everywhere. The range probably contains quoted text rather than formulas, or the calculation mode is set to Manual. Press F9 to recalculate, and check Formulas > Calculation Options is set to Automatic.
You see #REF!, #VALUE! or zeroes after filling. The relative references have shifted past the edge of your data, or they now point at blank or text cells. Click the offending cell, read the formula bar, and compare with the original. Anchor the fixed references with $ and re-copy.
The formula copied as a number. You may have pasted values, or the cell was formatted as Text before you typed the formula. Change the format to General, then re-enter the formula in the source cell and copy again.
The fill handle does not appear. Enable it under File > Options > Advanced, in the Editing options section, by ticking Enable fill handle and cell drag-and-drop (on Mac, Excel > Preferences). If the option is unavailable on a shared or protected sheet, use copy and paste instead.
You cannot edit or fill cells at all. The sheet may be protected. Ask the owner to unprotect it (Review tab > Unprotect Sheet) if you are authorised; otherwise work on your own copy.
Only part of the range filled. The adjacent column may contain blank cells that stopped an automatic double-click fill. Select the exact range and paste into it explicitly.
Frequently Asked Questions
What is the difference between relative and absolute references?
Relative references like A1 change when you copy the formula to another cell, shifting by the same number of rows and columns you moved. Absolute references like $A$1 stay pointing at the same cell wherever you paste. A mix such as A$1 locks only the row.
How do I copy a formula down an entire column at once?
Type the formula in the first cell, copy it, then select the rest of the column range (or press Ctrl+Shift+Down to extend the selection) and paste. Alternatively, double-click the fill handle to fill down as far as the neighbouring column has data.
Why does dragging the fill handle copy the same value instead of the formula?
The cell probably contains a constant, not a formula, or the fill option is set to Copy Cells rather than Fill Series. Check the formula bar for a leading equals sign; if it is missing, Excel treats the entry as text.
Can I replicate a formula across sheets?
Yes. Copy the formula from one sheet, switch to the target sheet, and paste. References that included the sheet name, such as Sheet1!A2, will still point to that sheet unless you edit them. Copying the whole sheet (right-click the tab > Move or Copy) is often cleaner for many formulas.
Does this work the same on Excel for the web and mobile?
Copy and paste works everywhere, including the browser and mobile apps. Dragging the fill handle with a mouse is a desktop feature; on a touchscreen, select and drag the fill handle where the app offers it, or use copy and paste for reliability.
How do I stop Excel from changing my references when I copy?
Add dollar signs to the parts that must not move. Press F4 while editing the reference to cycle through the four combinations, or type the dollar signs manually before copying.