Cell Position

  • Thread starter Thread starter mazu
  • Start date Start date
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
 
you don't give a whole lot of info to streamline anything, but

celladdress = Cells.Find("Volume").address
 
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
 
Back
Top