![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Location: Detroit
Posts: 792
|
I need a macro to copy a range of clolumns and rows (say b2:g80) from one of my sheets to a new spreadsheet |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Where the wild roses grow
Posts: 285
|
Try:
Range("B2:G80").Copy Workbooks.Add ActiveSheet.Paste Audiojoe |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Let's say that we are copying you range "B2:G20" from Sheet1 to Sheet2:
HTH EDIT:: Oops, didn't see that you needed a new workbook. Use AudioJoe's. _________________ [b] Mark O'Brien [ This Message was edited by: Mark O'Brien on 2002-04-29 09:42 ] |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Apr 2002
Location: Detroit
Posts: 792
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|