find row index

  • Thread starter Thread starter crew3407
  • Start date Start date
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
 
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
 
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
 
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)
 

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