Excel精英培训网

 找回密码
 注册
查看: 1333|回复: 0

查找最后单元格的8中方法

[复制链接]
发表于 2016-1-11 17:28 | 显示全部楼层 |阅读模式
本帖最后由 一成不变变 于 2016-1-11 19:43 编辑

Sub 最后的单元格()
a = Cells(Rows.Count, 1).End(xlUp).Row 'end属性
b = Columns("B").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
i = ActiveSheet.Range("a65536").End(xlUp).Row
End Sub
不知还有没有其它方法,期待
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-4-28 06:04 , Processed in 0.200320 second(s), 7 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表