在EXCEL2007中怎么能将同一列中带底纹的单元格求和

2025-03-10 13:52:30
推荐回答(2个)
回答1:

http://jingyan.baidu.com/article/48a42057a8fbffa925250469.html

这里有详细说明

另外他的代码 缺少结束语句,我给补充完整, 用法他已经说的很清楚了

    Function MyColorSum(Ref_color As Range, Sum_range As Range)
    

    Application.Volatile
    Dim iCol As Integer
    Dim rCell As Range
    iCol = Ref_color.Interior.ColorIndex
    For Each rCell In Sum_range
    If iCol = rCell.Interior.ColorIndex Then
    MyColorSum = MyColorSum + rCell.Value
    End If
    Next rCell
    
    End Function

回答2:

excel带底纹单元格计算能够实现