Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can the column index in a cell address be made variable?
Hi,
To refer to a cell with a variable row number, we can just code it as, for example, Dim i As Interger i=234 Range("A" & i).Select To refer to a cell with a variable column index, it seems not that easy because the column index must be explicitly specified in a cell address. So, if I want to go to the j th column on the 2nd row or j columns to the right of cell AA3, is there a quick and easy way to do it? Thank you in advance. David |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can the column index in a cell address be made variable?
If you just want a single cell, use MySheet.Cells(i,j).
If you want a range, you can use with MySheet .Range(.Cells(i1,j1), .Cells(i2,j2)).... end with "cyberdude" wrote in message ups.com... Hi, To refer to a cell with a variable row number, we can just code it as, for example, Dim i As Interger i=234 Range("A" & i).Select To refer to a cell with a variable column index, it seems not that easy because the column index must be explicitly specified in a cell address. So, if I want to go to the j th column on the 2nd row or j columns to the right of cell AA3, is there a quick and easy way to do it? Thank you in advance. David |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can the column index in a cell address be made variable?
don't forget to check your post in .misc.
cyberdude wrote: Hi, To refer to a cell with a variable row number, we can just code it as, for example, Dim i As Interger i=234 Range("A" & i).Select To refer to a cell with a variable column index, it seems not that easy because the column index must be explicitly specified in a cell address. So, if I want to go to the j th column on the 2nd row or j columns to the right of cell AA3, is there a quick and easy way to do it? Thank you in advance. David -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I made a cell reference variable? i.e. =sum(D4:D(4+A2)) | Excel Worksheet Functions | |||
Can the column index in a cell address be made variable? | Excel Discussion (Misc queries) | |||
How can I use a variable as cell address? | Excel Programming | |||
Setting a variable cell address | Excel Discussion (Misc queries) | |||
Vlookup - column index number - create as variable | Excel Programming |