I have an excel sheet it contains data as below:
A B C D E F
1 10 11 12 78 45
2 12 15 15 78
To Select the last row with data, first move upwards from the bottom to find the row and then move leftwards on that row to find that last used column:
Sub SelectLastRow()
Dim nRow As Long, nColumn As Long
nRow = Cells(Rows.Count, "A").End(xlUp).Row
nColumn = Cells(nRow, Columns.Count).End(xlToLeft).Column
Range(Cells(nRow, "A"), Cells(nRow, nColumn)).Select
End Sub