SyntaxFix
Write A Post
Hire A Developer
Questions
you are turning them into an address but Cells(#,#) uses integer inputs not address inputs so just use lastRow = ActiveSheet.UsedRange.Rows.count and lastColumn = ActiveSheet.UsedRange.Columns.Count
lastRow = ActiveSheet.UsedRange.Rows.count
lastColumn = ActiveSheet.UsedRange.Columns.Count