Dim sh As Worksheet, shNam As String
Arr = Array("Test", "*TESTED_*")
If Not IsInArray(range("A1").Value, Arr) Then
If IsEmpty(ActiveSheet.range("A1")) Then Exit Sub
shNam = ActiveSheet.range("A1").Value
If SheetExists(ActiveWorkbook.Name, shNam) Then
Sheets(shNam).Activate
Else
End If
End If
End Sub
Public Function IsInArray(stringToBeFound As String, Arr As Variant) As Boolean
Dim i As Integer
For i = LBound(Arr) To UBound(Arr)
If Arr(i) = stringToBeFound Then
IsInArray = True
Exit Function
End If
Next i
IsInArray = False
End Function
Function SheetExists(wbName As String, shName As String) As Boolean
SheetExists = False
With Workbooks(wbName)
For Each sh In .Sheets
If sh.Name = shName Then
SheetExists = True
Exit For
End If
Next sh
End With
End Function