return the number of rows

  • Thread starter Thread starter youu917
  • Start date Start date
Y

youu917

if it possible to write a program that will return the Row/ column
number of the cells contain certain value?
 
Sure.....but could you explain yourself a little bit better?

otherwise we have to guess here...

cheers
Carlo
 
Sure.....but could you explain yourself a little bit better?

otherwise we have to guess here...

cheers
Carlo



- Show quoted text

something like a search engine: a textbox and a search button.once key
in the value in the textbox and pressed "search", it will track the
data in the work sheet1 and return the column number and row number in
the other 2 TextBoxes.

_____________ (Search)


Column:______________
Row:_________________
 
Dim cell As Range
With ActiveSheet.Range("a1:a500")
Set cell = .Find(2, LookIn:=xlValues)
If Not cell Is Nothing Then
MsgBox cell.Row & " - " & cell.Column
End If
End With

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



Sure.....but could you explain yourself a little bit better?

otherwise we have to guess here...

cheers
Carlo



- Show quoted text

something like a search engine: a textbox and a search button.once key
in the value in the textbox and pressed "search", it will track the
data in the work sheet1 and return the column number and row number in
the other 2 TextBoxes.

_____________ (Search)


Column:______________
Row:_________________
 

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