Hi All,
I have a range of cells, let's say B2:B6 with various names.
Now I would like to create worksheets for each of those names.
I have written the following, but it gives an error on line "sheets.name (cell)" with the error: "Compile error: method or data not found".
Additionally, besides giving a name, I would like to add data to each sheet. But I can just add a command for that after this is fixed.
Thank you
Sub CreateWorksheet() Dim ws As Worksheet Dim rng As Range Dim cell As Range Set ws = Sheets("Sheet1") Set rng = ws.Range("B2:B6") For Each cell In rng Sheets.Add Sheets.Name (cell) Next cell End Sub
Bookmarks