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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
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
 
Upvote 0

Forum statistics

Threads
1,216,108
Messages
6,128,872
Members
449,475
Latest member
Parik11

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