A memer turned me on to this fxn, which works perfectly to sum values in cells with a certain internal color.
My problem is I cannot figure out how to use the stdev (standard deviation) function on the same range that is used for the sum. Suggestions?
For Each Rng In InRange.Cells
If OfText = True Then
OK = (Rng.Font.ColorIndex = WhatColorIndex)
Else
OK = (Rng.Interior.ColorIndex = WhatColorIndex)
End If
If OK And IsNumeric(Rng.Value) Then
SumByColor = SumByColor + Rng.Value
End If
Next Rng
(Source: http://www.cpearson.com/excel/colors.htm)
My problem is I cannot figure out how to use the stdev (standard deviation) function on the same range that is used for the sum. Suggestions?
For Each Rng In InRange.Cells
If OfText = True Then
OK = (Rng.Font.ColorIndex = WhatColorIndex)
Else
OK = (Rng.Interior.ColorIndex = WhatColorIndex)
End If
If OK And IsNumeric(Rng.Value) Then
SumByColor = SumByColor + Rng.Value
End If
Next Rng
(Source: http://www.cpearson.com/excel/colors.htm)