What cell am I on ?

R

Rich

I wanted to do the following. I issue the find command to find a
certain text. Once found, I want to apply the cell address to a memory
variable. So the code might look this :

Cells.Find(What:="Totals", After:=ActiveCell, LookIn:=xlFormulas,
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False).Activate

lcAddress = ????

How do I do the above.
 
J

John Wilson

Rich,

Try this:

Sub TestMe()
Dim icAddr As String
icAddr = Cells.Find(What:="Totals", _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Address
MsgBox icAddr
End Sub

John
 

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

Top