I have been successfully finding the last used row of Excel sheets with the following line. $oRange = $oWorkbook.Sheets("Raw Data").UsedRange.SpecialCells($xlCellTypeLastCell) This works perfectly if there is no formatting in the sheet. However, if there is an empty cell with any formatting (highlighting, borders, defined number format, etc.) then that is the returned range. This is the correct behavior of the .UsedRange property and is expected. However, I need to find the last row