worksheet1.UsedRange.Rows.Count
With ActiveSheet.UsedRange x = .Cells(.Rows.Count, .Columns.Count).Row y = .Cells(.Rows.Count, .Columns.Count).ColumnEnd With
http://topic.csdn.net/t/20060710/15/4870962.html
[A65536].End(xlUp).Row