Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine the row number and column number of a cell 1

Status
Not open for further replies.

cojeda

MIS
Dec 13, 2007
10
US
I have a macro used to locate a key word. I need to assign the row number and column number to variables after the macro finds the key word. How can I determine this?

Thanks,

Chris
 





Hi,
Code:
dim found as range, sFind as string
sFind = "key word"
set found = activesheet.cells.find(sfind)
if not found is nothing then  
  with found
    lRowFound = .row
    iColFounc = .column
  end with
else
  msgbox sfind & " not found"
end if


Skip,
[sub]
[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top