Find/search function/example request.

A

Aaron

Does anyone have an example of finding information in excel and reading the
information into VB or VBA (preferably VB)?

Thanks,
Aaron
 
T

Tom Ogilvy

here is the help example for using the find method of the range object in
Excel:

With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Interior.Pattern = xlPatternGray50
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End WithFind has many more arguments. You can see and example of them by
turning on the macro recorder (tools=>Macros=>record a new macro) and then
 

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

Top