Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to take a sheet of compiled data and create several sheets
of individual data. The headers are in column A, so i'm trying to create a new sheet in the workbood for each value of column A. It keeps bombing out at different points, depending on what i try, here's what i have so far, the values in colum A start at A6, it's flagging For Each C In MyRange right now, any ideas? Sub NewSheet() Dim MyRange As Range Dim C As Range Dim NewSheetName As String Range("A6").Select ActiveCell.End(xlDown).Select xLastRow = ActiveCell.Row Range("A6" & xLastRow).Name = "MyRange" For Each C In MyRange Range("A" & MyRange).Name = "C" C.Select NewSheetName = Selection.Value Sheets.Add Type:="Worksheet" With ActiveSheet .Move After:=Worksheets(Worksheets.Count) .Name = NewSheetName End With Next C End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Grouping sheets copies Header across to all sheets | Excel Worksheet Functions | |||
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA | Excel Worksheet Functions | |||
Header repeat across Sheets? | Excel Discussion (Misc queries) | |||
xls header all sheets | Excel Discussion (Misc queries) | |||
How to set footer and header for all sheets? | Excel Programming |