VBA Code for Copy and Paseting function

Beachson

Active Member
Joined
Oct 28, 2009
Messages
468
Hi All (Excel 2007) , Many times I find myself for various reasons selecting cell A1 and highlighting everything on my spread sheet and then pasteing it to another spreadsheet instead of just clicking the slect all tab at the top left of the spreadsheet. Sometimes i filter certain criterias and then specifically select what I filtered. since the area I select changes for every spread sheet I have , what code would I use in a macro to state that I want to specifically highlight and copy from cell A1 to the farthest down and farthest across cell with data and then paste it to a new sheet after the new spreadsheet tab has been clicked?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Beachson

Active Member
Joined
Oct 28, 2009
Messages
468
Excel 2007 - I guess what I'm trying to say is I would like to write a VBA code that selects a specific are of text, and that specific area of text is Cell A1 to the farthest reaching cell with data in it (i.e all the visible data on my spread sheet) .... copies it and pastes it to a new sheet
 

Forum statistics

Threads
1,176,401
Messages
5,902,844
Members
435,001
Latest member
ahsanali32

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