Function SumIfBold(r As Range) As Double
Dim c As Range
Application.Volatile
For Each c In r
If c.Font.Bold Then s = s + Application.WorksheetFunction.Min(3000, c)
Next
SumIfBold = s
End Function
Function SumIfBold(MyRange As Range) As Double
Dim cell As Range
For Each cell In MyRange
If cell.Font.Bold Then
SumIfBold = SumIfBold + WorksheetFunction.Min(cell.Value, 3000)
End If
Next cell
End Function</pre>
Function SumIfBold(MyRange As Range) As Double
Dim cell As Range
For Each cell In MyRange
If cell.Font.Bold Then
SumIfBold = SumIfBold + WorksheetFunction.Min(cell.Value, 3000)
Else
SumIfBold = SumIfBold + cell.Value
End If
Next cell
End Function