View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default How can I use a cell value to select a sheet tab?

I misunderstood "SELECT"

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message
...
Right click sheet tabview codecopy/paste this.
Now, if you have the name of the sheet tab typed into a cell and double
click on that cell you are taken to the tab.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Application.DisplayAlerts = False
Dim WantedSheet As String
WantedSheet = Trim(ActiveCell.Value)
If WantedSheet = "" Then Exit Sub
On Error Resume Next
If Sheets(WantedSheet) Is Nothing Then
' GetWorkbook ' calls another macro to do that
Else
Application.GoTo Sheets(WantedSheet).Range("a1")
End If
Application.DisplayAlerts = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Monkey-See, Monkey-Do"
wrote in message
...
I want to be able to use values in column A (which match the names of the
worksheet tabs in my workbook), to select which sheet I look up (using
VLOOKUP) values in column B from (which contain values contained in one
of
those sheets).

I remember I did this once before using INDIRECT or something similar but
I
can't remember exactly how - can anyone help?

Cheers