Excel VBA Reference to Last Cell in table

Post date: Nov 20, 2013 7:10:37 PM

How many times have I had to loop through rows in an Excel table until I get to the Last Row. Too Many times and I always forget the quick reference to the row count.Well here it is as VBA code... Dim numRows As Integer numRows = ActiveSheet.Columns("A:A").SpecialCells(xlLastCell).RowSee also the MSDN page http://msdn.microsoft.com/en-us/library/office/aa213567%28v=office.11%29.aspx

Excel Icon

Use at will!