Jagdev Singh
Active Member
Hi Experts
I want to capture the used range from a sheet. The code which I am using right now is
My data range starts from B5
I am getting the exact count when I run the code and put my cursor on LastRow1 (55 rows), but the range gets selected till 554.
Am I doing something wrong here.
Regards,
JD
I want to capture the used range from a sheet. The code which I am using right now is
Code:
Dim LastRow1 As Long
LastRow1 = ActiveSheet.UsedRange.Rows.Count
Range("$B$5:$P$5" & LastRow1).Select
My data range starts from B5
I am getting the exact count when I run the code and put my cursor on LastRow1 (55 rows), but the range gets selected till 554.
Am I doing something wrong here.
Regards,
JD