LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Copy sheets with content into same workbook

Hi,

I want to build a macro in which 6 particular sheets are copied (with
content, formulas and pivottables) and put at the end of the workbook.
The problem with recording is that the original sheets can differ from
sheet name on each update of the database because of a macro that
looks at a certain cell of that particular sheet and than renames
accordingly (after updating the pivot). Today the sheet name can be
6a- CELL- SRMS-AD and the next time 6a- NUT -SRMS-AD.
At recording it looks like this, but this is not working for me. Any
help???


Sub multiplysheets()
' multiplysheets Macro
' Macro recorded 27-3-2007 by Karata01

Sheets(Array("6a- Cell-SRMS-AD YTD", "6b- Cell-SRMS-AD-CUS YTD", _
"6c- Cell-SRMS-AD-CUS YTD", "6d- Cell-SRMS-A-P-C YTD", "6e-
Cell-Enduse YTD", _
"6f- Cell-SRMS-cntry YTD")).Select
Sheets("6f- Cell-SRMS-cntry YTD").Activate
Sheets(Array("6a- Cell-SRMS-AD YTD", "6b- Cell-SRMS-AD-CUS YTD", _
"6c- Cell-SRMS-AD-CUS YTD", "6d- Cell-SRMS-A-P-C YTD", "6e-
Cell-Enduse YTD", _
"6f- Cell-SRMS-cntry YTD")).Copy Befo=Sheets(53)
End Sub

Thanks in advance

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy all sheets to a new workbook futbol Setting up and Configuration of Excel 3 November 16th 07 12:09 PM
Copy several sheets from one workbook into another at the same tim WiFiMike2006 Excel Discussion (Misc queries) 2 February 8th 07 08:36 PM
copy workbook sheets? L. Setting up and Configuration of Excel 3 November 29th 05 03:30 AM
Copy 1-4 sheets to a new workbook ole_ Excel Programming 3 June 30th 05 11:11 AM
copy 3 sheets & save them into new workbook shital Excel Programming 1 October 21st 03 01:04 AM


All times are GMT +1. The time now is 12:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"