lookup value in column

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

thanks for help:
do you have any idea, how to find out, if a value (B5) IS in a range
(A2:A4000)?
I can´t sort these values, so I thought I can´t use any search function, and
don´t have idea how to compile this code. thanks
 
Hi,

Try this:-

Sub surface()
Set myrange = Range("A2:A4000")
For Each c In myrange
c.Select
If c.Value = "B5" Then
MsgBox (" B5 found in " & ActiveCell.Address)
End If
Next
End Sub

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top