乔山办公网我们一直在努力
您的位置:乔山办公网 > excel表格制作 > <em>EXCEL</em> <em>VB</em>A 获取特定区域内的

<em>EXCEL</em> <em>VB</em>A 获取特定区域内的

作者:乔山办公网日期:

返回目录: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等于 该表格 所有有使用的区域的数值求和

相关阅读

关键词不能为空
极力推荐

ppt怎么做_excel表格制作_office365_word文档_365办公网