Excel makes it easy to copy your formula across an entire row or column, but you don't always get the results you want. If you end up with unexpected results, or those awful #REF and /DIV0 errors, it can be extremely frustrating. But don't worry—you won't need to edit your 5,000 line spreadsheet cell-by-cell. This wikiHow teaches you easy ways to copy formulas to other cells.
Steps
-
Open your workbook in Excel. Sometimes, you have a large spreadsheet full of formulas, and you want to copy them exactly . Changing everything to absolute cell references would be tedious, especially if you just want to change them back again afterward. Use this method to quickly move formulas with relative cell references elsewhere without changing the references. [1] X Research source In our example spreadsheet, we want to copy the formulas from column C to column D without changing anything.
Example Spreadsheet Column A Column B Column C Column D row 1944
Frogs
= A1 /2
row 2636
Toads
= A2 /2
row 3712
Newts
= A3 /2
row 4690
Snakes
= A4 /2
- If you're just trying to copy the formula in a single cell, skip to the last step ("Try alternate methods") in this section.
-
Press Ctrl + H to open the Find window. The shortcut is the same on Windows and macOS.Advertisement
-
Find and replace "=" with another character. Type "=" into the "Find what" field, and then type a different character into the "Replace with" box. Click Replace All to turn all formulas (which always begin with an equal's sign) into text strings beginning with some other character. Always use a character that you have not used in your spreadsheet. For example, replace it with # or &, or a longer string of characters, such as ##&.
Example Spreadsheet Column A Column B Column C Column D row 1944
Frogs
##& A1 /2
row 2636
Toads
##& A2 /2
row 3712
Newts
##& A3 /2
row 4690
Snakes
##& A4 /2
- Do not use the characters * or ?, since these will make later steps more difficult.
-
Copy and paste the cells. Highlight the cells you want to copy, and then press Ctrl + C (PC) or Cmd + C (Mac) to copy them. Then, select the cells you want to paste into, and press Ctrl + V (PC) or Cmd + V (Mac) to paste. Since they are no longer interpreted as formulas, they will be copied exactly.
Example Spreadsheet Column A Column B Column C Column D row 1944
Frogs
##& A1 /2
##& A1 /2
row 2636
Toads
##& A2 /2
##& A2 /2
row 3712
Newts
##& A3 /2
##& A3 /2
row 4690
Snakes
##& A4 /2
##& A4 /2
-
Use Find & Replace again to reverse the change. Now that you have the formulas where you want them, use "Replace All" again to reverse your change. In our example, we'll look for the character string "##&" and replace it with "=" again, so those cells become formulas once again. You can now continue editing your spreadsheet as usual:
Example Spreadsheet Column A Column B Column C Column D row 1944
Frogs
= A1 /2
= A1 /2
row 2636
Toads
= A2 /2
= A2 /2
row 3712
Newts
= A3 /2
= A3 /2
row 4690
Snakes
= A4 /2
= A4 /2
-
Try alternate methods. If the method described above doesn't work for some reason, or if you are worried about accidentally changing other cell contents with the "Replace all" option, there are a couple other things you can try:
- To copy a single cell's formula without changing references, select the cell, then copy the formula shown in the formula bar near the top of the window (not in the cell itself). Press Esc to close the formula bar, then paste the formula wherever you need it.
- Press Ctrl and ` (usually on the same key as ~) to put the spreadsheet in formula view mode. Copy the formulas and paste them into a text editor such as Notepad or TextEdit. Copy them again, then paste them back into the spreadsheet at the desired location. Then, press Ctrl and ` again to switch back to regular viewing mode.
- If you want to try a different method entirely, jump ahead to our sections on filling a column or row , pasting a formula into multiple cells , or using relative and absolute cell references .
-
Type a formula into a blank cell. Excel makes it easy to propagate a formula down a column or across a row by "filling" the cells. As with any formula, start with an = sign, then use whichever functions or arithmetic you'd like. We'll use a simple example spreadsheet, and add column A and column B together. Press Enter or Return to calculate the formula.
Example Spreadsheet Column A Column B Column C row 110
9
19
row 220
8
row 330
7
row 440
6
-
Click the lower right corner of the cell with the formula you want to copy. The cursor will become a bold + sign.
-
Click and drag the cursor across the column or row you're copying to. The formula you entered will automatically be entered into the cells you've highlighted. Relative cell references will automatically update to refer to the cell in the same relative position rather than stay exactly the same. Here's our example spreadsheet, showing the formulas used and the results displayed:
Example Spreadsheet Column A Column B Column C row 110
9
= A1 + B1
row 220
8
= A2 + B2
row 330
7
= A3 + B3
row 440
6
= A4 + B4
Example Spreadsheet Column A Column B Column C row 110
9
19
row 220
8
28
row 330
7
37
row 440
6
46
- You can also double-click the plus sign to fill the entire column instead of dragging. Excel will stop filling out the column if it sees an empty cell. If the reference data contains a gap, you will have to repeat this step to fill out the column below the gap.
- Another way to fill the entire column with the same formula is to select the cells directly below the one containing the formula and then press Ctrl + D . [2] X Research source
-
Type the formula into one cell. As with any formula, start with an = sign, then use whichever functions or arithmetic you'd like. We'll use a simple example spreadsheet, and add column A and column B together. When you press Enter or Return , the formula will calculate.
Example Spreadsheet Column A Column B Column C row 110
9
19
row 220
8
row 330
7
row 440
6
-
Select the cell and press Ctrl + C (PC) or ⌘ Command + C (Mac). This copies the formula to your clipboard.
-
Select the cells you want to copy the formula to. Click on one and drag up or down using your mouse or the arrow keys. Unlike with the column or row fill method, the cells you are copying the formula to do not need to be adjacent to the cell you are copying from. You can hold down the Control key while selecting to copy non-adjacent cells and ranges.
-
Press Ctrl + V (PC) or ⌘ Command + V (Mac) to paste. The formulas now appear in the selected cells.
-
Use a relative cell reference in a formula. In an Excel formula, a "cell reference" is the address a cell. You can type these in manually, or click on the cell you wish to use while you are entering a formula. For example, the following spreadsheet has a formula that references cell A2:
Relative References Column A Column B Column C row 250
7
= A2 *2
row 3100
row 4200
row 5400
-
Understand why they're called relative references. In an Excel formula, a relative reference uses the relative position of a cell address. In our example, C2 has the formula “=A2”, which is a relative reference to the value two cells to the left. If you copy the formula into C4, then it will still refer to two cells to the left, now showing “=A4”.
Relative References Column A Column B Column C row 250
7
= A2 *2
row 3100
row 4200
= A4 *2
row 5400
- This works for cells outside of the same row and column as well. If you copied the same formula from cell C1 into cell D6 (not shown), Excel would change the reference "A2" to a cell one column to the right (C→D) and 5 rows below (2→7), or "B7".
-
Use an absolute reference instead. Let's say you don't want Excel to automatically change your formula. Instead of using a relative cell reference, you can make it absolute by adding a $ symbol in front of the column or row that you want to keep the same, no matter where you copy the formula too. [3] X Research source Here are a few example spreadsheets, showing the original formula in larger, bold text, and the result when you copy-paste it to other cells:
- Relative Column, Absolute Row (B$3):
The formula has an absolute reference to row 3, so it always refers to row 3:
Column A Column B Column C row 150
7
= B$3
row 2100
= A$3
= B$3
row 3200
= A$3
= B$3
row 4400
= A$3
= B$3
- Absolute Column, Relative Row ($B1):
The formula has an absolute reference to column B, so it always refers to column B.
Column A Column B Column C row 150
7
= $B1
row 2100
= $B2
= $B2
row 3200
= $B3
= $B3
row 4400
= $B4
= $B4
- Absolute Column & Row ($B$1):
The formula has an absolute reference to column B of row 1, so it always refers to column B of row 1.
Column A Column B Column C row 150
7
= $B$1
row 2100
= $B$1
= $B$1
row 3200
= $B$1
= $B$1
row 4400
= $B$1
= $B$1
- Relative Column, Absolute Row (B$3):
The formula has an absolute reference to row 3, so it always refers to row 3:
-
Use the F4 key to switch between absolute and relative. Highlight a cell reference in a formula by clicking it and press F4 to automatically add or remove $ symbols. Keep pressing F4 until the absolute or relative references you'd like are selected, then press Enter or Return .
Community Q&A
-
QuestionWhen I try to pull down formula, it stays the same and does not change with row, what can I do?Community AnswerGo to Formulas, Calculation Options, and change them from Manual to Automatic.
-
QuestionWhen I click and drag, it copies the format also. I don't want to copy the format, just the formula?Krisztian TothCommunity AnswerRight after the drag there should be an icon in the lower right corner of the highlighted area. Hover over that and select from the various fill options, among which you can find an option to fill without format.
-
QuestionHow do I copy a date formula I have created (that includes the week day as well as date) so that it runs in sequence?Krisztian TothCommunity AnswerDouble click into the cell, copy your formula, double click into the destination cell, then press Ctrl+V or Command+V.
Video
Tips
- If you copy a formula to a new cell and see a green triangle, Excel has detected a possible error. Examine the formula carefully to see if anything went wrong. [4] X Research sourceThanks
- If you accidentally did replace the = character with ? or * in the "copying a formula exactly" method, searching for "?" or "*" will not give you the results you expect. Correct this by searching for "~?" or for "~*" instead. [5] X Research sourceThanks
- Select a cell and press Ctrl ' (apostrophe) to fill it with the formula directly above it.Thanks
Warnings
- Different versions of Excel may not show exactly the same screenshots in the same ways as are displayed here.Thanks
References
- ↑ http://www.extendoffice.com/documents/excel/598-excel-copy-without-changing-formulas.html
- ↑ https://www.excel-exercise.com/ctrl-d-the-secret-revealed/
- ↑ http://office.microsoft.com/en-us/excel-help/move-or-copy-a-formula-HP010102342.aspx
- ↑ https://www.pryor.com/blog/copy-excel-formulas-down-to-fill-a-column/
- ↑ http://office.microsoft.com/en-us/excel-help/find-or-replace-text-and-numbers-on-a-worksheet-HP001216390.aspx
About This Article
To copy a formula into multiple adjoining cells in Microsoft Excel, type the formula into a cell, and then press Enter or Return to calculate it. Hover your mouse cursor over the bottom-right corner of the cell so the cursor turns to a crosshair, then drag the crosshair down to copy the formula to other cells in the column. If you'd rather copy the formula to cells in a row, drag the crosshair left or right. To copy a formula to cells that aren't touching the formula cell, click the cell once to select it, and then press Control + C (on a PC) or Command + C (on a Mac) to copy the formula. Now, select the cell or cells you want to copy the formula to, then press Control + V (on a PC) or Command + V (on a Mac) to paste it into the selected cells.