Showing posts with label Find last row or last column. Show all posts
Showing posts with label Find last row or last column. Show all posts

Saturday, June 26, 2010

Finding the last row or column

How to find the last row or last column in any excel sheet

LR = ActiveSheet.UsedRange.SpecialCells(xlLastCell).Row
LC = ActiveSheet.UsedRange.SpecialCells(xlLastCell).Column

or 

LR= range("A65536").end(xlup).row
Lc=range("IV1").end(xltoleft).column