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
In case anyone looks at this again, you can use this:
Sub test() Dim sh As Worksheet Set sh = ThisWorkbook.Sheets("Sheet1") Dim k As Long k = sh.Range("A1", sh.Range("A1").End(xlDown).End(xlDown).End(xlUp)).Rows.Count End Sub