作者:乔山办公网日期:
返回目录:excel表格制作
Sub s()
For i = 11 To 29 Step 2
c = 0
sm = 0
For j = 7 To 16
If Cells(j, i) <> "" Then
c = c + 1
sm = sm + Cells(j, i)
End If
Next
If c Then
Cells(3, i - 1) = c
Cells(5, i - 1) = sm
End If
Next
End Sub
没图,没附件谁也不知道你要干嘛
dim a as double
a = application.worksheetfunction.sum(range("a1:c10"))
'执行结果,a等于 表格百 a1:c10 返回的数值求和
a = application.worksheetfunction.sum(sheets("表格名字度").usedrange)
'执行结果,a等于 该表格 所有有专使用的区域的属数值求和