John Carney
asked on
Excel VBA equivalent of a range definition
This range definition (LastCol) gives me the last column of my 11-column wide Table1:
=OFFSET(Table1,0,10,ROWS(T able1),COL UMNS(Table 1)-10)
How do I express that in VBA so that I don't have to create and name the range before running a macro that relies on it?
Thanks,
John
=OFFSET(Table1,0,10,ROWS(T
How do I express that in VBA so that I don't have to create and name the range before running a macro that relies on it?
Thanks,
John
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to help. BTW, if you always want the last column, but are not sure which column number that would be...
With Range("Table1")
Set MyLastColumn = .Columns(.Columns.Count)
End With
Glad to see you're making progress on the VBA front, John.
Thomas
Thomas
ASKER
And thanks Thomas for a way to approach it when there's no pre-defined range to play off of.
- John