‘第一种:RANGE的END属性方法
Sub text1()
i =Range("a65536").End(xlUp).Row
End Sub
第二种:CELLS的END属性方法
Sub text2()
i = Cells(Rows.Count, 1).End(xlUp).Row
End Sub
第三种:find 方法
Sub text3()
i = Columns(1).Find("*",searchdirection:=xlPrevious).Row
End Sub
Sub text4()
第四种:取数组函数
arr = Sheet1.UsedRange
i = UBound(arr)
End Sub
在实际根据具体情况灵活运用