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 Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,387
Members
448,957
Latest member
Hat4Life

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
Back
Top