Cell Position

M

mazu

Hi,

I am trying to write down a macro.
I am using the following one line code to find out where "volume" is written
in a cell.
Cells.Find("Volume").Activate
I would like to know the cell number or position, wheather it is B12 or A12
or S12.
Whatever may be the position. I want to track the position, and based on
that position i need to copy some associated values.

Any help or directions will be appreciated

Thanks,

Mazed
 
G

Gary Keramidas

you don't give a whole lot of info to streamline anything, but

celladdress = Cells.Find("Volume").address
 
T

Tom Hutchins

Try something like

Dim c
'Search the active sheet for "Volume"
Set c = Cells.Find(What:="Volume", After:=Range("A1"), LookIn:=xlValues)
'Returns Nothing if not found
If Not c Is Nothing Then
MsgBox c.Address
End If

Hope this helps,

Hutch
 

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