Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Exact Formula Copies.

Exact Formula Copies

by Allen Wyatt
(last updated May 16, 2018)

8

Many formulas in a worksheet don't occur in solitude—they often appear numerous times in a worksheet. For instance, you may copy a formula into a range of cells in a column, each formula operating on data on its own row.

When you copy formulas, Excel automatically adjusts any relative cell references in the formula so that they remain relative in the target cell. For instance, if a formula in cell C4 is =A4+B4, then copying the formula down to cell C5 results in the formula =A5+B5.

There may be times when you want to create an exact copy of a formula, without Excel adjusting the relative cell references during the copy process. Assuming you want to make an exact copy of the formula in cell C4 and copy it to C5, follow these steps:

  1. Select cell C4.
  2. Press F2. Excel enters Edit mode, with the insertion point at the end of the formula.
  3. Press Shift+Ctrl+Home. Excel selects everything in the cell, back to the beginning of the formula.
  4. Press Ctrl+C to copy the selected text (the formula's text) to the Clipboard.
  5. Press Enter to move to cell C5.
  6. Press Ctrl+V to paste the Clipboard contents into the cell.

During this paste process, the relative cell references are not updated—the formula in cell C5 is now an exact duplicate of the one in cell C4.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6159) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Exact Formula Copies.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Using the Insert Key to Insert Text

The Insert key can be used for different purposes, depending on how you configure the program. This tip explains those ...

Discover More

Finding Other Instances of Excel in a Macro

When processing information using a macro, you may need to know if there are any other instances of Excel running on a ...

Discover More

Converting UNIX Date/Time Stamps

If you import information generated on a UNIX system, you may need to figure out how to change the date/time stamps to ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Using a Formula to Replace Spaces with Dashes

If you need a formula to change spaces to some other character, the SUBSTITUTE function fits the bill. Here's how to use it.

Discover More

Ignoring Case in a Comparison

Do you want Excel to take the case of your text into account when it does comparisons in a formula? The IF statement ...

Discover More

Extracting Street Numbers from an Address

Want to know how to move pieces of information contained in one cell into individual cells? This option exists if using ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is six more than 6?

2018-05-24 10:49:30

Peter Atherton

With regard to Allen's comments on Mac issues, I've just come across these links.

Here is a page listing known issues:

http://www.rondebruin.nl/mac/mac027.htm

Additional tips for cross-platform compatibility:

http://www.rondebruin.nl/mac.htm

Jim Gordon posted these on answers.microsoft.com


2018-05-24 10:00:46

MIchael Armstrong

I just select the cell with the formula, then select whatever portion of the formula I want to copy, then hit ESC. The to-be-copied string is now on the clipboard and I'm free to paste it anywhere I choose.


2018-05-23 10:18:40

Peter Atherton

Allen

Thanks for comment, Excel versions seem to becoming more separate. I seem to remember you mentioning TEXTJOIN and CELLTEXT functions (the names might be wrong), but these are both not included in xl2016. I just keep using my own UDFs to join cell text and to return the formula of a cell.


2018-05-22 09:28:05

Allen

I appreciate the comments provided by both Willy and Peter; they work great.

However, people may want to remember that NEITHER of their approaches will work in all versions of Excel on the Mac. In Office 365 on the Mac (Excel 2016 as of this writing), there is some funky problem where you cannot stuff information into the Clipboard, even using a Microsoft Forms 2.0 Library reference. When the solution provided by Peter is tried, it results in a run-time error of "ActiveX component can't create object."

These solutions work just fine on versions of Excel for Windows, but they don't work reliably on versions of Excel for the Mac.

-Allen


2018-05-22 08:56:46

Peter Atherton

Willy's macro works fine, but if you get an error trying to run it you need to make a reference to Forms. In the VB Editor choose Tools --> References --> Click checkbox against Microsoft Forms 2.0 Object Library and click OK. See the picture below. I guess that Willy did this so long ago he had forgotten it.

If you want to use this on many machines you might be quicker using the macro (link below) that does not need the the link as it is included in the code.
https://chandoo.org/forum/threads/copy-formula-from-excel-to-clipboard-in-vba-compatible-format.35997/

(see Figure 1 below)


Figure 1. 




2018-05-19 06:27:59

Willy Vanhaelen

If you have to do this very often this macro can be helpfull:

Sub CopyExact()
If TypeName(Selection) <> "Range" Then Exit Sub
Dim X
Set X = New DataObject
X.SetText ActiveCell.Formula
X.PutInClipboard
End Sub

You can assign a shortcut to this macro or create a button on the QAT.
All you have to do is move the cell pointer to the cell whose formula you want to copy and run the macro. The formula text is now on the clipboard and you can paste it anywhere as a clone of the formula, preserving the original cell-references.


2018-05-18 18:19:42

Ruthie A. Ward

I suppose once you get the rhythym of the keystrokes, it might be faster to use the above method. I'll have to try it when I want to copy the entire formula in a cell without Excel automatically changing the references. Thanks!


2018-05-16 10:29:43

Cam Peneff

Mich easier to just copy and paste the cell. Rather than using the full handle.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.