Copying and Pasting a Formula Using a Macro.

Ste_Moore01

Active Member
Joined
Jul 13, 2005
Messages
467
Hi guys,

I'm trying to copy a formula from one cell to another using a macro.

By copying the formula, I mean the exact formula and not just copying the cell and pasting so the formula changes for your destination cell. I've tried recording a macro and it won't allow me to do it that way.

Is there any way to do this?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

RAM

Well-known Member
Joined
Oct 4, 2004
Messages
1,862
You need to anchor the cell references in the original formula, i.e. A1 will be $A$1.

The fastest way to do this is selecting the cell with the formula, mark the cell references in the Formula Bar and hit F4.

HTH

RAM
 

RAM

Well-known Member
Joined
Oct 4, 2004
Messages
1,862
You can mark the whole formula in the Formula Bar in a case like this one. In other cases when you need only one cell ref anchored, i.e. A1, not A1+A2, then you mark only A1 in the Formula Bar and hit F4. Hitting F4 more than one time gives you different anchor positions as if you want to anchor the row or the column: $A1 will anchor Column A. A$1 will anchor row 1 in Column A. $A$1 will anchor cell A1
Book12
ABCD
1312
243
354
465
576
687
798
8109
91110
101211
11
12
Sheet1



RAM
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,805
Messages
5,833,764
Members
430,230
Latest member
Yimmie

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top