-
Solved: Trim the fat
Hello, I tried to "trim the fat" from this code to no avail.
Keeping in mind that there is no need to filter the data as column A will always be a unique number AND that there are no headers ,what parts of the code can be deleted and still have a new sheet created for each row of the active sheet (without headers as in S1 when code is run)?
Thank you
-
How about
[VBA]
Sub MakeSheets()
Dim cel As Range, sh As Worksheet
For Each cel In Range("Sheet1!A:A")
If cel = "" Then Exit Sub
Set sh = Sheets.Add
sh.Name = cel
Next
End Sub
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
Sorry for the delay, my wife took me for a walk.
Thank you for the simplified code mdmackillop can you further help so that each new sheet would pickup the data of the corresponding row?
Many thanks
Nick
-
[VBA] sh.Name = cel
sh.Rows("1:1").Value = cel.EntireRow.Value
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
Yes it is perfect now.
Thank you for your help,
Nick
I'll mark it "solved" as soon as I find the darn button
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules