nnsea 发表于 2023-10-26 23:42:55

根据颜色求和


Function SumColor(i As Range, ary1 As Range)
Dim icell As Range
Application.Volatile
For Each icell In ary1
If icell.Interior.ColorIndex = i.Interior.ColorIndex Then
SumColor = Application.Sum(icell) + SumColor
End If
Next icell
End Function
页: [1]
查看完整版本: 根据颜色求和