Friday, January 15, 2021

Move or copy a formula

It's important to be aware of the possibilities for how a relative cell reference might change when you move or copy a formula.

  • Moving a formula: When you move a formula, the cell references within the formula do not change no matter what type of cell reference that you use.

  • Copying a formula: When you copy a formula, relative cell references will change.

Move a formula

  1. Select the cell that contains the formula that you want to move.

  2. In the Clipboard group of the Home tab, click Cut.

    You can also move formulas by dragging the border of the selected cell to the upper-left cell of the paste area. This will replace any existing data.

  3. Do one of the following:

    • To paste the formula and any formatting: In the Clipboard group of the Home tab, click Paste.

    • To paste the formula only: In the Clipboard group of the Home tab, click Paste, click Paste Special, and then click Formulas.

Copy a formula

  1. Select the cell containing the formula that you want to copy.

  2. In the Clipboard group of the Home tab, click Copy.

  3. Do one of the following:

    • To paste the formula and any formatting, in the Clipboard group of the Home tab, click Paste.

    • To paste the formula only, iIn the Clipboard group of the Home tab, click Paste, click Paste Special, and then click Formulas.
       

      Note: You can paste only the formula results. In the Clipboard group of the Home tab, click Paste, click Paste Special, and then click Values.

  4. Verify that the cell references in the formula produce the result that you want. If necessary, switch the type of reference by doing the following:

    1. Select the cell that contains the formula.

    2. In the formula bar Button image , select the reference that you want to change.

    3. Press F4 to switch between the combinations.

      The table summarizes how a reference type will updates if a formula containing the reference is copied two cells down and two cells to the right.

For a formula being copied:

If the reference is:

It changes to:

Formula being copied from A1, to two cells down and to the right

$A$1 (absolute column and absolute row)

$A$1

A$1 (relative column and absolute row)

C$1

$A1 (absolute column and relative row)

$A3

A1 (relative column and relative row)

C3

Note: You can also copy formulas into adjacent cells by using the fill handle Fill handle . After verifying that the cell references in the formula produce the result that you want in step 4, select the cell that contains the copied formula, and then drag the fill handle over the range that you want to fill.

Moving formulas is very much like moving data in cells. The one thing to watch for is that the cell references used in the formula are still what you want after you move.

  1. Select the cell that contains the formula you want to move.

  2. Click Home > Cut (or press Ctrl + X).

    Cut command in the Clipboard group

  3. Select the cell you want the formula to be in, and then click Paste (or press Ctrl + V).

    Paste command in the Clipboard group

  4. Verify that the cell references are still what you want.

    Tip: You can also right-click the cells to cut and paste the formula.
    Right-click to see the Copy, Cut, and Paste commands

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

See Also

Copy and paste a formula to another cell or worksheet

Switch between relative, absolute, and mixed references

No comments:

Post a Comment