Find a Row

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

Guest

I want to do a text search in column A of sheet 1. I want the ROW number
where it finds this text first to be displayed. Then I want to select the
3rd columns to the right of the row containing the text.
Is that possible in VBA ?
Jeff
 
Sub FindIt()
Dim sfind As String
Dim rownum As Long
sfind = "apple"
rownum = Application.WorksheetFunction. _
Match(sfind, Range("A:A"), 0)
MsgBox Cells(rownum, "D").Value
End Sub

HTH
Jason
Atlanta, GA
 
Hi
use
=VLOOKUP("text",A1:D100,4,0)
if you need the value from this column
 

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