I have this VBA code looking in Column C for what ever I type in the InputBox and then it will go to the cell with that name.
I cannot get it to stay in Column C.
I have tried the Range(C:C) in several different places but nothing works.
Thank You.
Sub CompanySearch()
' CompanySearch Macro
Range("C:C").Select
what = InputBox("COMPANY NAME", "SEARCH")
If what = "" Then
MsgBox ("You must enter a contact name - Click OK to exit.")
Range("A1").Select
Else
Set found = Cells.Find(what:=what, MatchCase:=False)
If Not found Is Nothing Then
found.Activate
Selection.FindNext(After:=ActiveCell).Select
Else
MsgBox ("Not found - Click ok to exit.")
Range("A1").Select
End If
End If
End Sub
Bookmarks