Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Find the Column address from a Range Dimensioned Variable
I am trying to use a Range demensioned variable as a column address in a
..Cells(... command to give another variable a cell address. It Looks a little Like THis DescriptionP3 = Sheets("5-year Plan").Cells(LoopedRowFrom, GeneralDisc.Column) I am Fairly certain that the problem is with the GeneralDisc variable. Thanks for all Suggestions |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Find the Column address from a Range Dimensioned Variable
Hope the below examples will help. .Column and .Row returns the column and
row of the first column and first row in the range Example : Set myRange = Range("A1:E20") myRange.Column will return 1 myRange.Row will return 1 Set myRange = Range("E1:E20") myRange.Column will return 5 myRange.Row will return 1 If this post helps click Yes --------------- Jacob Skaria "Ironhydroxide" wrote: I am trying to use a Range demensioned variable as a column address in a .Cells(... command to give another variable a cell address. It Looks a little Like THis DescriptionP3 = Sheets("5-year Plan").Cells(LoopedRowFrom, GeneralDisc.Column) I am Fairly certain that the problem is with the GeneralDisc variable. Thanks for all Suggestions |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Find the Column address from a Range Dimensioned Variab
FOund out myself, (yours sounded a little too bookish)
With GeneralDisc .Select BetweenGeneral = ActiveCell.Column End With DescriptionP3 = Sheets("5-year Plan").Cells(LoopedRowFrom, BetweenGeneral) I didnt realize that i had to go through another step to do this. i figured it could calculate it in the .Cells( , ) command. "Jacob Skaria" wrote: Hope the below examples will help. .Column and .Row returns the column and row of the first column and first row in the range Example : Set myRange = Range("A1:E20") myRange.Column will return 1 myRange.Row will return 1 Set myRange = Range("E1:E20") myRange.Column will return 5 myRange.Row will return 1 If this post helps click Yes --------------- Jacob Skaria "Ironhydroxide" wrote: I am trying to use a Range demensioned variable as a column address in a .Cells(... command to give another variable a cell address. It Looks a little Like THis DescriptionP3 = Sheets("5-year Plan").Cells(LoopedRowFrom, GeneralDisc.Column) I am Fairly certain that the problem is with the GeneralDisc variable. Thanks for all Suggestions |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
pass named range address into variable | Excel Programming | |||
Using variable for range address | Excel Programming | |||
select range and put range address in variable | Excel Programming | |||
How do you get a Selected Range address into a variable? | Excel Programming |