I have two ways in VBA which used to apply to determine the last row on the sheet, both ones of course got from EE :-)
1) LastRowWithValue = Columns(1).SpecialCells(xlCellTypeBlanks)(1).row - 1
2) LastRowWithValue = ActiveSheet.UsedRange.row - 1 + ActiveSheet.UsedRange.Rows.Count
Basically the second one is good for almost each cases, except one file where the first one is more reliable, but sometimes brings "No cells found" error message.
Could you please advise how it could be done that if the 1) version says "No cells found" error message, in that case the macro should apply the 2) version?