Rename Sheet using Cell Reference
Right click the sheet and select view code and paste in
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
ActiveSheet.Name = Target.Value
End If
End Sub
--
Regards,
Peo Sjoblom
"RDana" wrote in message
...
Is is possible to automatically rename a worksheet based on the contents
of a
cell? For Example:
Cell A1 contains Bob Smith - I'd like the worksheet to automatically name
itself Bob Smith, even if the contents of A1 change.
I've done a search of the discussions here and found:
=MID(CELL("filename",a1),SEARCH("]",CELL("filename",a1))+1,1024)
The above example however works in reverse from what I'm looking for and
copies the worksheet name to the cell. What I'd like to accomplish is
copying the cell to the worksheet name if possible.
|