Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Search and Goto
I need to create a formular or macro that when a number is typed, it will
take you to the cell. I know about the find feature, but if there is a way to search and goto, that would be preferable. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Search and Goto
On Sep 27, 7:14 pm, Dgwood90
wrote: I need to create a formular or macro that when a number is typed, it will take you to the cell. I know about the find feature, but if there is a way to search and goto, that would be preferable. OK is clicked, it will locate the first occurrence of that value in the active worksheet. Sub findMe() Dim nput As String, found As Range nput = InputBox("Enter what to find") If nput < "" Then Set found = Cells.Find(What:=nput, After:=Cells(1, 1), _ LookIn:=xlValues, LookAt:=xlWhole, _ SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False) If Not found Is Nothing Then Range(found.Address).Activate Else MsgBox nput & " not found" End If End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
goto (F5) question | Excel Discussion (Misc queries) | |||
Goto code | Excel Discussion (Misc queries) | |||
If.....Then GoTo....... | Excel Discussion (Misc queries) | |||
Goto in IF statment | Excel Discussion (Misc queries) | |||
Using 'GoTo' in a Macro | Excel Discussion (Misc queries) |