Search data inside column

  • Thread starter Thread starter SANTANDER
  • Start date Start date
S

SANTANDER

Just want implement search option in Excel workbook - to search for target
name in rows of the first column.
How to implement this better?

Regards
 
Would you like the Search to display the row number or select the cell?
 
Sub santander()
Dim s As String
s = Application.InputBox(prompt:="Enter Name to be found: ", Type:=2)
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
If s = Cells(i, 1).Value Then
Application.Goto reference:=Cells(i, 1), scroll:=True
Exit Sub
End If
Next
MsgBox (s & " not found")
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top