GA81848
Board Regular
- Joined
- Apr 25, 2005
- Messages
- 124
I need some help with a variable range in which both the start point and end point can change.
To give you an example I have data in cells B55:D100. Extra rows can be inserted either above this range or within it. To give an example:-
If a row is inserted at line 23, my data then moves to B56:D101.
I've tried using something like this but am getting lost with it:-
Dim LastRow1 As Long
Dim LastRow2 As Long
LastRow1 = Range("B5000").End(xlUp).Row
MsgBox LastRow1
LastRow2 = Range(lastrow1).End(xlUp).Row
MsgBox LastRow2
Can anyone help?
To give you an example I have data in cells B55:D100. Extra rows can be inserted either above this range or within it. To give an example:-
If a row is inserted at line 23, my data then moves to B56:D101.
I've tried using something like this but am getting lost with it:-
Dim LastRow1 As Long
Dim LastRow2 As Long
LastRow1 = Range("B5000").End(xlUp).Row
MsgBox LastRow1
LastRow2 = Range(lastrow1).End(xlUp).Row
MsgBox LastRow2
Can anyone help?