Here's one approach:
When in Excel, entering Cntl-End will take you to the last row/column.
In VBA, you use:
ActiveCell.SpecialCells(xlLastCell).Select
Then Selection.Row and Selection.Column are the row and Column
Cells(1,Selection.Column + 1) = Selection.Column + 1
Cells(Selection.Row + 1,1) = Selection.Row + 1
will place the Row number and column Number in the next row or Column.
This approach can be unpredictable, because if data is removed, the
columns will not be identified as "blank" until the file is saved and
re-opened.
Are there any rows or columns that you KNOW will have data?
(column headings, perhaps a serial number?)
If so, you can use worksheetfunction counta to count the rows or
columns.