Simple Excel VB problem
Sub elkw()
v = Sheets("s1").Range("A1").Value
Set r2 = Sheets("s2").Range("A1:B9")
k = Application.CountIf(r2, v)
If k 0 Then
MsgBox (v & " is there")
Else
MsgBox (v & " is not there")
End If
End Sub
Gets a value from sheet s1 and looks for it in a range of cells in sheet s2
--
Gary''s Student
gsnu200712
|