I am trying to find the last row and the last column of an area I select in the sheet.
typically I use this to find last row and column:
LR = Cells(Rows.Count, 1).End(xlUp).Row
LC = Cells(1, Columns.Count).End(xlToLeft).Column
However these lines are for Row = 1 and Column = 1.
let say I have a table elsewhere. I want to select the table and run the code. Then I want the following variables:
FirstRowTable =
LastRowTable =
FirstColumnTable =
LastColumnTable =
I tried somehting like this, but it is not working:
LastRowTable = Selection.Row + Selection.Rows.Count - 1
FirstRowTable = Selection.Row
Any ideas?