Hi
you have to use VBA for this. e.g. put the following code in your workshete
module
Private Sub Worksheet_Change(ByVal Target As Range)
if target.address="$A$4" then
on error resume next
application.enableevents=false
me.name=target.value
application.enableevents=true
end if
End Sub
Yes, with event code (if you mean "so that the sheet name becomes whatever's
in A4" & not the other way around).
Rightclick the sheet tab, click "View Code" ; then paste the following into
the worksheet module.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$4" Then Exit Sub
On Error GoTo 100:
ActiveSheet.Name = Target
Exit Sub
100:
MsgBox "Cannot rename sheet."
End Sub
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.