Macro to copy specific columns to new worksheet

UHsoccer

Well-known Member
Joined
Apr 3, 2002
Messages
1,023
I need a macro to copy a range of clolumns and rows (say b2:g80) from one of my sheets to a new spreadsheet
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Let's say that we are copying you range "B2:G20" from Sheet1 to Sheet2:<pre>
Sheets("Sheet1").Range("B2:G80").Copy Destination:=Sheets("Sheet2").Range("B2:G80")</pre>

HTH

EDIT:: Oops, didn't see that you needed a new workbook. Use AudioJoe's.
_________________<font color = green> Mark O'Brien
This message was edited by Mark O'Brien on 2002-04-29 09:42
 
Upvote 0
Thanks, but additional control needed

1) Column widths are destroyed
2) New book has three (un-named) sheet1, sheet2, sheet3. Need one NAMED sheet called "Quote"

I was using (but do not want to hide, but really not copy those columns


Sheets("Quote Tool").Select
Sheets("Quote Tool").Copy
Columns("G:G").ColumnWidth = 3.86
Columns("G:G").Select
Range("G2").Activate
ActiveWindow.ScrollColumn = 2
Columns("G:ak").Select
Range("G2").Activate
Selection.EntireColumn.Hidden = True
ActiveWindow.ScrollColumn = 1
 
Upvote 0

Forum statistics

Threads
1,214,958
Messages
6,122,475
Members
449,087
Latest member
RExcelSearch

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