gywrq
举报
Dim a As Variant a = Range("AD1") Range("W2").Select ActiveCell.FormulaR1C1 = _ "=SumProduct((明细!Range(Cells(2, 1).Address, Cells(a), 1)=RC1))*(明细!Range(Cells(2, 19).Address, Cells(a), 19)=R1C))*(明细!Range(Cells(2, 1).Address, Cells(a), 1))" 套到公式里运行,提示:应用程序或对象定义错误!