Can Tab name in worksheet change automatically by referencing a ce

A

Alvyn

Dear Sir/Mdm,

Anyone kind enough to advice whether the following can be achieve and how?

Default name for tab in an Excel sheet is Sheet 1, Sheet 2 etc.
Is it possible to automatically change the name of the tab based on the data
on Sheet 6?

Eg, In the same workbook, Column A1 to A5 in Sheet 6 contains the following :

A1=A
A2=B
A3=C
A4=D
A5=E

Can I achieve to have Sheet1 change to A, Sheet2 to B, Sheet3 to C and etc?

Thanks

Alvyn
 
R

ryguy7272

The code below will name each sheet as the text or value in the Range of
cells that you choose:
Sub renamre()
Sheets("Sheet1").Activate
n = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To n
Sheets(i + 1).Name = Cells(i, 1).Value
Next
End Sub


Regards,
Ryan---
 
A

Alvyn

Dear Ryan

Thanks for the code. However, could you please elaborate where should I
insert this code into?

Thanks :)

Alvyn
 

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