copy and paste formula without clipboard?

samsilverman

Board Regular
Joined
Nov 9, 2009
Messages
176
Is there a way to copy and paste a formula with some vba instead of the clipboard? Every once and awhile, I'll be trying to make duplicate copies of a page in a worksheet so that I have 50 - 100 pages of the same template. Sometimes the formulas copy/paste great with relative referencing. But sometimes, it will paste like it's an absolute reference. Plus, the copy/paste is reallllllly slow sometimes with a lot of formulas.

Any help or ideas?
 
My thought (wacky or not) was to plunk the range into two arrays. One made up of ea cell's "formula" and the other of the values. Then run through the array of "formulas" replacing any elements that are not actually formulas with the corresponding element from the array of values. I was thinking that this should keep the references relative.

Did it work?

I literally just LOL in a Lakeland Starbucks! I have NO IDEA what you just said (at least some of it).

Sometimes I think you guys must look at us like the IT guy (Nick Burn's ?/Jimmy Falon) on that old SNL skit. Of course, you are all much, much nicer and more patient. Still....

I sincerely am sorry and I probably wasted a few minutes of your time. But, I can't even begin to understand what you were (very kindly) trying to do. Actually, it must be some type of glitch that just happens every once and awhile. Maybe it has something to do with the amount VBA or formulas. But sometimes, even the simplest of formulas paste as absolute instead of relative. It as if I hit F2, copied the inside data from the cell, went to another cell, hit F2 and then pasted it....instead of just copying and pasting it. As you can see from my code, I am not using any $ signs.

I finally just dumped pages 2-100 and then copy/pasted page 1 again until I had 100 pages in that worksheet. Worked fine...have no idea why.

Thanks for your input, GTO!!
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,224,620
Messages
6,179,928
Members
452,949
Latest member
beartooth91

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