By: Durjoy Paul

Hello Nathan,
first of all, if you want to use sum color function, you can use the following code.

Function SumByCol(SumRange As Range, SumColor As Range)
Dim SumColValue As Integer
Dim TotSum As Long
SumColValue = SumColor.Interior.ColorIndex
Set pCell = SumRange
For Each pCell In SumRange
If pCell.Interior.ColorIndex = SumColValue Then
TotSum = TotSum + pCell.Value
End If
Next pCell
SumByCol = TotSum
End Function

Then, close the VBA code and select any cell where you want to put the sum value. After that, write the following formula
=SumByCol(C5:C10,C13)
Where the range of cells C5 to C10 defines the range. C13 defines the color. You need to show only color in one cell. From where you can take the reference. Here, C13 denotes that color reference. So, when you want to change the color, you have to change the color reference also.