Sub searchmain()
Dim InputItem As Variant, sq
Dim c As Range
Dim firstaddress As String
InputItem = ""
InputItem = Application.InputBox("Please enter the number you wish to find", "Number", "")
If InputItem = "" Or InputItem = False Then Exit Sub
Set c = Columns(7).Find(InputItem, , xlValues, xlWhole)
If Not c Is Nothing Then
firstaddress = c.Address
Do
sq = sq & ",row " & c.Row
Set c = Columns(7).FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstaddress
MsgBox Join(Split(Mid(sq, 2), ","), vbLf)
Else
MsgBox "not found", 48, "error"
End If
End Sub
Bookmarks