我在表中使用了模块 计算单列中 单元格按不同填充色自动汇总
Function CountColor(col As Range, countrange As Range) As Integer
Dim icell As Range
Application.Volatile
For Each icell In countrange
If icell.Interior.ColorIndex = col.Interior.ColorIndex Then
CountColor = CountColor + 1
End If
Next icell
End Function
Function SumColor(col As Range, sumrange As Range) As Integer
Dim icell As Range
Application.Volatile
For Each icell In sumrange
If icell.Interior.ColorIndex = col.Interior.ColorIndex Then
SumColor = Application.Sum(icell) + SumColor
End If
Next icell
End Function
在单元格数值 小于40000时 没有问题 可以计算 单元格数值 大于40000时 则出现错误
有谁能说明一下为什么会出现 这种问题吗?怎么解决?[url=]收起[/url]
我用是的2010 版本