excel表格sumproduct公式怎么操作 vba中的sumproduct如何写?

[更新]
·
·
分类:互联网
1443 阅读

excel表格sumproduct公式怎么操作

vba中的sumproduct如何写?

vba中的sumproduct如何写?

你的公式是要得到指定i,统计cells(i,5)在E列且cells(i,6)在F列出现的次数,你的用意可能是要找出EF列记录重复的记录.如果我理解错了或有不明白的地方,请Hi我吧!
我做了两个函数可以实现:
1,zxc()以i为参数返回cells(i,5)且cells(i,6)出现的次数
()以单元格为参数返回cells(i,5)且cells(i,6)出现的次数
Function zxc(i As Integer) As Integer
指定i,统计cells(i,5)在E列且cells(i,6)在F列出现的次数
cnt 0
If i 1 Then
R Range(E65535).End(xlUp).Row
Tmp1 Cells(i, 5).Value
Tmp2 Cells(i, 6).Value
For j 2 To R
If Cells(j, 5).Value Tmp1 And Cells(j, 6).Value Tmp2 Then
cnt cnt 1
End If
Next
End If
zxc cnt
End Function
Function mxb(addr As Range) As Integer
指定i,统计cells(i,5)在E列且cells(i,6)在F列出现的次数
cnt 0
i
R Range(E65535).End(xlUp).Row
Tmp1 Cells(i, 5).Value
Tmp2 Cells(i, 6).Value
For j 2 To R
If Cells(j, 5).Value Tmp1 And Cells(j, 6).Value Tmp2 Then
cnt cnt 1
End If
Next
zxc1 cnt
End Function

Excel表格中成本核算公式怎么设置?

1、对构成成本的要素进行整理,将单位耗用及单价分列对应,然后在C18单元格输入SUMPRODUCT(B2:B17,C2:C17)得到税前合计2、在D19单元格输入D18*0.06 得到应付税金3、在C20单元格输入C18 C19 得到税后合计