how do I name a worksheet after a cell

A

awatt

Unfortunately I couldn't see the answer to a similar question posted a few
months ago. Basically, I have an Excel model that has multiple sheets and I
would like it such that the tabs are named automatically from a list on the
front sheet.
Many thanks for your help
Andy
 
C

Chip Pearson

Andy,

Try something like the following. It will name the sheets to the
values in A1:A3.

Dim Ndx As Long
For Ndx = 1 To 3
Worksheets(Ndx).Name = Cells(Ndx, "A")
Next Ndx


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top