Auto Expend Range Using Macro

T

taych

I would like to use macro to auto select my range of data, say A1:M50
which is expendable or contractible.

What command should I include in the macro?

Many thank
 
B

BrianB

Something like this ? ...........

'-----------------------------------------
Sub test()
Dim MyRange As Range
Dim Rw1 As Long
Dim Col1 As Integer
Dim Rw2 As Long
Dim Col2 As Integer
'--------------------------
Rw1 = 1 ' Row 1
Col1 = 1 ' Column 1
Rw2 = 50 ' Row 50
Col2 = 13 'Column M
Set MyRange = ActiveSheet.Range(Cells(Rw1, Col1), Cells(Rw2
Col2))
MyRange.Select

End Sub
'----------------------------------------
 
T

taych

Thanks BrianB for the help, but it does not seems to work for me, mayb
I did posted my problems incorrectly or not clearly.

What I actually want is if the range is to be expended to A1:M70 fro
A1:M50, the macro will automatically select the new range
 
Top