Jacob


Posted by Paul on January 16, 2002 1:12 PM

can you modify your code so if it does not find the number it will let me know?

Sub MyMarco()
Dim searchvalue
Dim c
Do
searchvalue = InputBox("What number do you want to search for? Enter Stop to quit")
With Range("A2:A2500")
Set c = .Find(What:=searchvalue, lookat:=xlWhole, LookIn:=xlValues)
If c Is Nothing Then
Else
Range(c.Address).Offset(0, 5).FormulaR1C1 = Date
End If
End With
Loop While searchvalue <> "Stop"
End Sub

Posted by Jacob on January 16, 2002 1:42 PM

Ya just add it to the If c is nothing then
i.e.
msgbox("I cant find any " & searchvalue), vbinformation,"Match Not Found"




Posted by Paul on January 16, 2002 1:52 PM

Thanks