LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Create Sheets from a Range and Copy Data on copy Data on newlycreated Sheets with the Sheet Names

On Feb 7, 7:27*pm, Don Guillett wrote:
Should work in version xl2003 and later

Sub CreateSheetsFromAList()
Dim MyCell As Range
Dim MyRange As Range

Set MyRange = Sheets("Summary").Range("A2")
Set MyRange = Range(MyRange, MyRange.End(xlDown))

For Each MyCell In MyRange
Sheets.Add After:=Sheets(Sheets.Count) 'creates a new worksheet
With ActiveSheet
*.Name = MyCell
* Sheets("sheet1").Range("a2:h12").Copy .Range("b2")
*.Range("a2:a12,b1") = MyCell
End With
Next MyCell
End Sub

On Feb 7, 12:44*am, prkhan56 wrote:



Hello,
I am using Excel 2010.


I got this macro which makes new sheets according to the Names on the
Summary Sheet.


Sub CreateSheetsFromAList()
Dim MyCell As Range, MyRange As Range


Set MyRange = Sheets("Summary").Range("A2")
Set MyRange = Range(MyRange, MyRange.End(xlDown))


For Each MyCell In MyRange
Sheets.Add After:=Sheets(Sheets.Count) 'creates a new worksheet
Sheets(Sheets.Count).Name = MyCell.Value ' renames the new worksheet
Next MyCell
End Sub


I also wish to achieve following with the macro.
1) It should copy the Data from Sheet1 (A2:H12) on all the newly
created sheets in the Range B2:I2 on each sheet.
*2) The name of each Sheet should appear in Cell B1 on all sheets and
also in the range A2:A12 on all the sheets creates.


Thanks in advance
R Khan- Hide quoted text -


- Show quoted text -


Works like a charm! You are a great help...always.
Thanks a lot
 
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
create sheets based on data in string and copy to J.W. Aldridge Excel Programming 3 May 5th 09 09:10 PM
copy data of different range to other sheets sutha Excel Programming 7 December 8th 08 02:21 PM
Copy data from multiple sheets into new sheet Angie Excel Worksheet Functions 0 June 5th 07 10:53 PM
copy data from various sheets into one sheet vik Excel Worksheet Functions 2 April 14th 06 08:17 PM
in VBA Sheets("mysheet").Copy Befo=Sheets(1) how do i get a reference to the newly created copy of this sheet? Daniel Excel Worksheet Functions 1 July 6th 05 09:57 PM


All times are GMT +1. The time now is 10:45 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"