Tab Name same as Cell

H

halem2

Hi everyone:

I need to have the tab name for each sheet be the same a s the conten
of, let's say, cell (1,1).

I'm new at this and I solemly swear I did look at the object browse
but could not find which object refers to the worksheet tab.

thanks
 
T

Tom Ogilvy

dim sh as worksheet
for each sh in Activeworkbook.worksheets
sh.name = sh.Cells(1,1).Value
Next
 
C

Chip Pearson

If you want the cell to contains the tab name, use a formula like

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,99)

If you want the tab name to be named the same as the contents of
cell A1, you need to use VBA:

Worksheets(1).Name = Range("A1").Text


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

halem2

thanks Chip ...it's so straight forward that it makes me wanna kic
myself...you know where.

thanks agai
 
Top