SyntaxFix
Write A Post
Hire A Developer
Questions
Old thread but I have found a simple way that seems to work
ws.getRange("A2").getNextDataCell(SpreadsheetApp.Direction.DOWN).getLastRow()