How to find the last row in an excel sheet

How to find the last row in an excel sheet:
ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row
Here is an example
Dim LastRow As Long
LastRow = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row
For r = 1 To LastRow


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>