标签: excel excel-vba vba
例如我在工作簿上有7张纸然后我想要计算每张纸的所有行。每张纸的总行数。
答案 0 :(得分:1)
同样的问题已回答here
For Each sh In Activeworkbook.Worksheets MsgBox "Sheet " & sh.Name & " has " & sh.Cells(sh.Rows.Count, "A").End(xlUp).Row - 1 & " rows" Next sh
行中的-1(排除标题行)