Sub create_sheet_from_list() Dim MyCell As Range, MyRange As Range Set MyRange = Sheets("Generate").Range("C6") Set MyRange = Range(MyRange, MyRange.End(xlDown)) Application.ScreenUpdating = False Application.DisplayAlerts = False Application.AskToUpdateLinks = False Application.EnableEvents = False For Each MyCell In MyRange If MyCell.Value = "" Then 'Check for null/empty value cell' Exit Sub 'If reach to null cell then exit sub' Else Sheets("X").Copy After:=Sheets(Sheets.Count) 'creates a new worksheet' Sheets(Sheets.Count).Name = MyCell.Value ' renames the new worksheet' End If Next MyCell Application.ScreenUpdating = True Application.DisplayAlerts = True Application.AskToUpdateLinks = True Application.EnableEvents = True End Sub
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter