How to use a SUMIF or SUMIFS function (or any conditional function or formula) on cell background color.
There is no default way to do this in Excel, which means that we have to go through a rather annoying multi-step process. That said, there are many ways that you can achieve this result; however I will show you the method that allows you the most versatility and will work when building large SUMIFS functions or any other kind of conditional function such as COUNTIFS or IF.
Use Conditional Functions on Cell Background Color
This does require a macro, but it's not difficult to use and I'll walk you through every step.
Sub ListColors()
For Each c In Selection
c.Offset(0, 1).Value = c.Interior.Color
Next c
End Sub
Let's SUM all values that start with "gsc" but that are not light green.
=SUMIFS(E2:E9,A2:A9,"gsc*",C2:C9,"<>8122747")
Important: this macro will put the Color Value numbers in the column that is directly to the right of the column that you selected that has the background colors - if you don't make a new column for it, it will overwrite whatever data is currently there.
There are many ways to do this kind of thing in Excel, and you can even make custom functions that SUM or COUNT based on color, but I find it more useful to have a separate column for Color Values that you can then use any way you like in any kind of formula or function.
If you don't like the Color Value column or it messes-up the look of your data table, simply hide it after you finished making conditions based on it.
Download the sample file for this tutorial so you can work along.