Sub 最后的单元格()
a = Cells(Rows.Count, 1).End(xlUp).Row 'end属性
b = Columns(1).Find("*", , , , , xlPrevious).Row 'find方法
c = Cells.SpecialCells(xlCellTypeLastCell).Row 'specialcells方法
d = Sheet1.UsedRange.Rows.Count 'usedrange属性
e = [a1].CurrentRegion.Rows.Count 'currentregion属性
f = WorksheetFunction.CountA([a:a]) '工作表函数counta
g = Application.CountIf([a:a], "<>") '工作表函数countif
End Sub如何找到最后一个单元格VB
最新推荐文章于 2023-11-29 18:20:29 发布
本文介绍使用VBA在Excel中定位最后一个非空单元格的不同方法,包括使用end属性、find方法、specialcells方法、usedrange属性、currentregion属性及工作表函数counta和countif等。
1万+

被折叠的 条评论
为什么被折叠?



