Private Sub Worksheet_Change(ByVal Target As Range)
Dim varPoradi
Dim strAdresa As String
'seznam adres
arrAdresy = Array("T6", "T8", "T10", "T12", "T14", "T16", "T18", "T20", _
"T22", "T24")
'adresa menene bunky
strAdresa = Target.Address(0, 0)
On Error Resume Next
'pokus o nalezeni poradi menene bunky v seznamu
varPoradi = Application.Match(strAdresa, arrAdresy, 0)
On Error GoTo 0
'jestlize adresa menene bunky byla nalezena v seznamu
If Not IsError(varPoradi) Then
'zmena nazvu listu
Worksheets(varPoradi).Name = Range(strAdresa).Text
End If
End Subcitovat