Ulisses_Carso
New Member
- Joined
- Sep 4, 2020
- Messages
- 39
- Office Version
- 365
- Platform
- Windows
Hello Guys,
I'm trying to make select code tha finds the Last Row, then find and jump to the Last Column in the same Line and select that Cell
Example: i have 10 columns with 40 lines
Line A with Header, Column A with Data and the rest is blank
This way, the last cell is J40, but i don't know how to find and select that cell, I already tried to merge two codes that find the last row and column separately but no success.
I'm trying to make select code tha finds the Last Row, then find and jump to the Last Column in the same Line and select that Cell
Example: i have 10 columns with 40 lines
Line A with Header, Column A with Data and the rest is blank
This way, the last cell is J40, but i don't know how to find and select that cell, I already tried to merge two codes that find the last row and column separately but no success.
VBA Code:
Sub FindLastRow()
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Select
End With
End Sub
Sub FIndLasCol()
Dim LastCol As Integer
With ActiveSheet
LastCol = .Cells(1, .Columns.Count).End(xlToLeft).Select
End With
End Sub