Pasting a Dynamic Range of cells to a new workbook

imported_unknown

Active Member
Joined
Jan 13, 2002
Messages
424
How do you do this with code. I would like to automate the copying and pasting of cells to a new worksheet (monthly). For some reason, our users keep messing up the results???? I am at a loss of ideas?? Any suggestions would be great.

Thank you in advance for your support.

Mahalo!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

sagain2k

Board Regular
Joined
Sep 8, 2002
Messages
94
Try the formula: =Sheet1!A1 into a cell in Sheet3 (for example). Then you can Copy/Paste or use Fill Right and Fill Down from that formula to automatically generate more refereces.

If you want VBA to create that reference formula for you, something like the code below will work. Hope this helps!

--Ray

'ENTERING THE REFERENCE FORMULA
ActiveCell.Formula = "=Sheet1!A3"

ActiveCell.Copy 'COPIES THE REFERENCE

'SELECTS THE RANGE FROM ACTIVE CELL TO
'CELL OFFSET BY 4 ROWS & 6 COLUMNS
Range(ActiveCell.Address & ":" & ActiveCell.Offset(4, 6).Address).Select

ActiveSheet.Paste 'PASTES ALL THE REFERENCES
 
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,164,025
Messages
5,835,010
Members
430,332
Latest member
Charly_Moon

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