I have written a simple code to illustrate my predicament.
Sub test() Dim sh As Worksheet Set sh = ThisWorkbook.Sheets(\"Sheet1\") Dim k As Lon
Probably a better solution is work upwards from the bottom:
k=sh.Range("A1048576").end(xlUp).row