ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Assigning cell address components to variables (https://www.excelbanter.com/excel-programming/331825-assigning-cell-address-components-variables.html)

Conan Kelly

Assigning cell address components to variables
 
Hello All,

I've been looking through the VBA help to find the answer to this with no
luck.

Can I assign the Row number and Cell number for the currently sellected cell
to individual variables for use later in formulas and range selection. For
example, I have a large list. I move to the end of the list by holding down
[Ctrl] and then the down arrow. This is where I would like to store the row
number into a variable. I would then move to a predetermined column in that
row and enter formulas using these variables.

If I can assign these to variables, do I have to be concerned with the cell
address format I use in my formulas or can these variables automaticaly
converted to the different address formats?

Thanks for any help anyone can provide,

Conan



Arvi Laanemets

Assigning cell address components to variables
 
Hi

......
CurrRow = ActiveCell.Row
CurrCol = ActiveCell.Column
LastRow = ActiveSheet.UsedRange.Rows.Count

--
Arvi Laanemets
( My real mail address: arvil<attarkon.ee )



"Conan Kelly" <CTBarbarin at msn dot com wrote in message
...
Hello All,

I've been looking through the VBA help to find the answer to this with no
luck.

Can I assign the Row number and Cell number for the currently sellected
cell to individual variables for use later in formulas and range
selection. For example, I have a large list. I move to the end of the
list by holding down [Ctrl] and then the down arrow. This is where I
would like to store the row number into a variable. I would then move to
a predetermined column in that row and enter formulas using these
variables.

If I can assign these to variables, do I have to be concerned with the
cell address format I use in my formulas or can these variables
automaticaly converted to the different address formats?

Thanks for any help anyone can provide,

Conan





All times are GMT +1. The time now is 03:29 AM.

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