Search This Blog

2016/12/21

VBA: Get max row/column number|最大行/列取得

Max row number
MaxRow = Range("A1").End(xlToRight).End(xlDown).Row
Max Column number
MaxCol = Range("A1").End(xlToRight).End(xlToRight).Column
Or count back of end
MaxRow = Range("A666666").End(xlUp).Row
MaxCol = Range("IV1").End(xlToLeft).Column
In Micsoft Excel 2010, the maximum row is 1048576, the maximum column is XFD

No comments :

Post a Comment