One way to do this is to navigate through the sheets and check cell D1 in each sheet if the value is equal to the specified number....
Sub GotoNumber()
Dim SixDigit As String
Dim SheetCount As Integer
Dim SheetIndex As Integer
Dim QuerySheet As Worksheet
SixDigit = InputBox("Enter 6-digit number:", "What's the number")
SheetCount = Sheets.Count
For SheetIndex = 1 To SheetCount
Set QuerySheet = Worksheets(SheetIndex)
If QuerySheet.Range("D1").Value = SixDigit Then
QuerySheet.Activate
QuerySheet.Range("D1").Activate
Exit Sub
End If
Next SheetIndex
MsgBox "Cannot find '" & SixDigit & "'.", vbInformation, "Not Found"
End Sub
Originally Posted by
Greg B
I am hoping to use a inputbox to have the user type in the 6 digit number
each client has been assigned. I would like for the ability for excel to see
this number and go to the corresponding sheet with this number.
The number is place in cell "d1"
Is this possible
TIA
Greg
Bookmarks