底纹作为单元格格式,不作为数据本身,无法用函数调用。只能用VBA来编写一个自定义函数
Public Function diwun(ran As Range) As Long
Dim rng As Range
Dim n As Long
n = 0
For Each rng In ran
If rng.Interior.ColorIndex > 0 Then n = n + 1
Next
diwun = n
End Function
将上面代码保存到模块中,你便可能用=diwun(A1:D100)的方式来统计有色标的单元格个数了