Jeffrey W Smith
New Member
- Joined
- Nov 7, 2004
- Messages
- 27
I've been working with VBA for awhile, but I've always had a problem changing the size of a selected range.
For instance, if I have a column of numbers starting in Cell C3, but don't know how many rows it uses, then I have to create a range that goes to the last used cell. Just to make it interesting, there may be blank cells within the column.
With the activecell on the first value in the column:
The last statement doesn't work because it resizes the top of the selected range to Cell C1.
Any suggestions?
Jeff
For instance, if I have a column of numbers starting in Cell C3, but don't know how many rows it uses, then I have to create a range that goes to the last used cell. Just to make it interesting, there may be blank cells within the column.
With the activecell on the first value in the column:
Code:
Range(activecell,activecell.offset(10000,0)).select
Range(Selection,selection.end(xlup)).select
The last statement doesn't work because it resizes the top of the selected range to Cell C1.
Any suggestions?
Jeff