View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Open a worksheet by refrencing a number in 1 cell

Not possible with a formula to activate another worksheet.

You could possibly do it with VBA event code but I don't know if scanning a
value into a cell triggers a change event

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Sheets(Target.Value).Activate
End If
End Sub

This is worksheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the code into that module. Edit to suit then Alt + q to return
to Excel.


Gord Dibben MS Excel MVP

On Thu, 5 Nov 2009 12:24:01 -0800, HAD
wrote:

Is it opssible to write a formula that will link to open a tab without
clicking on a hyperlink.? For instance I will have 3 pages in my workbook. I
will be using a program that will scan a number into cell A1. Once the
number is in A1 there will be a matching page with that number and I want
that page to automatically open. So when 15556453 is entered in A1 it will
open page 15556453 and display what is on that sheet. I will have page 3
that refrences a differnt number 16987543, when this number is entered into
A1 on the first page it will then open 16987543. Is there a way to have a
function open sheet and display what is on it?

Thanks!