For Each r In Selection.Rows
For Each c In r
sum = sum + 1
Next c
Next r
计算行数但不计算单元格
For Each r In Selection.Rows
For Each c In r
msgbox "val = " & c.Value
Next c
Next r
因“类型不匹配”而失败。摔了什么?选择对象手册在哪里?