Name your Lookup tables are per code;VB:Sub namesheets() Dim MyEntry As String Dim MyLookUp1 As String Dim MyLookup2 As String Dim MyLookup3 As String MyEntry = InputBox( _ Prompt:="Please enter an Item:", _ Title:="Lookup sheet name") If MyEntry = vbNullString Then Exit Sub With WorksheetFunction If .CountIf(Range("Table1").Columns(1), MyEntry) > 0 Then MyLookUp1 = .VLookup(MyEntry, Range("Table1"), 2, False) Sheets(1).Name = MyLookUp1 End If If .CountIf(Range("Table2").Columns(1), MyEntry) > 0 Then MyLookup2 = .VLookup(MyEntry, Range("Table2"), 2, False) Sheets(2).Name = MyLookup2 End If If .CountIf(Range("Table3").Columns(1), MyEntry) > 0 Then MyLookup3 = .VLookup(MyEntry, Range("Table3"), 2, False) Sheets(3).Name = MyLookup3 End If End With End Sub


Reply With Quote
Bookmarks