ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cell Position (https://www.excelbanter.com/excel-programming/421016-cell-position.html)

mazu

Cell Position
 
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

Gary Keramidas

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

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


--


Gary

"mazu" wrote in message
...
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




Tom Hutchins

Cell Position
 
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

"mazu" wrote:

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



All times are GMT +1. The time now is 10:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com