find row index

C

crew3407

Hello,

Quick question, I was just wondering how you find the row index of
cell that i found using find and then storing that into a variable.
need to reference information in that row. Thank
 
S

Stephan Kassanke

crew3407 > said:
Hello,

Quick question, I was just wondering how you find the row index of a
cell that i found using find and then storing that into a variable. I
need to reference information in that row. Thanks

the find method results in a range object.

set myresult = .find(.....)

You can assign myresult.row then to your variable.

cheers,
Stephan
 
B

Bernie Deitrick

Crew,

Try something like

Dim myRow As Long
Dim myCell As Range

Set myCell = Cells.Find(.......)
If Not MyCell Is Nothing Then
myRow = myCell.Row
End If

Then myRow can be used like

Cells(myRow,3).Value = "This is entered into column C"

HTH,
Bernie
MS Excel MVP
 
B

Bob Phillips

Activecell.Row

or

Range(myvar).Row

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top