Search a Range take Action
Sub Locate()
Dim rng As Range
Dim iAns As Integer
Set rng = Application.InputBox("Enter range, e.g. A1:A8, by typing
or sweeping cells.", Type:=8)
iAns = Application.InputBox("Look for what?")
For Each c In rng
If c = iAns Then c.Offset(0, 1) = "Yes"
Next c
End Sub
Merjet
|