3
Thanks

A few words of thanks would be greatly appreciated.

How To Create and Name Worksheets Based on a List via an Excel Macro

Excel allows you quite a lot of freedom to customize your user experience via the use of macros. This tutorial will show you how to create and name worksheets using an existing list via a macro.



Create Worksheets Using a List via an Excel Macro

This code may help you to automatically create and rename worksheets, based on a list that exists in another sheet:


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

Set MyRange = Sheets("Summary").Range("A10")
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

Image: © Dzmitry Kliapitski - Shutterstock.com
3
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Published by . Latest update on by Olivia Long.

This document, titled "How To Create and Name Worksheets Based on a List via an Excel Macro," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (https://ccm.net/).
1 vote - 5.0 /5

1 Comment

Thanxxxx