Sep 07 2022 03:16 AM - edited Sep 07 2022 03:40 AM
Hello Everyone,
I want something different in VBA code.
Like if I have data in A Column from A1 to A13 and
in B Column, the data is from B1 to B4 and B6 to B8
If I will apply VBA - Range(ActiveCell, ActiveCell.End(xlDown)).Select, it will only select data from B1 to B4.
But I want to select data from B1 (ActiveCell) to B13 (Last used row in that worksheet)
It can be done by ASAP Utilities.
ASAP > Select > 9.Extend Selection to the last used row
Please help..??
Here is a attached file...
Sep 07 2022 04:18 AM
Sub SelectToLastRow()
Dim LastRow As Long
LastRow = Cells.Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Range(ActiveCell, Cells(LastRow, ActiveCell.Column)).Select
End Sub
Sep 07 2022 05:27 AM
@Excel Try below simple macro.
Sub SelectTillLast()
Dim lr As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
Range("B1:B" & lr).Select
End Sub