|I agree that we need more info, but...|
You can SUM cells by Fill Colors by using the ColorIndex property in VBA. However, if the color is caused by Conditional Formatting, it's a little tougher.
For Fill Colors, here's a simple example.
'To Sum the Red cells
For Each cell In Range("A1:A10")
If cell.Interior.ColorIndex = 3 Then RedSum = RedSum + cell.Value
Range("B1") = RedSum
For a lot more detail, see here:
For a thread on working with colors caused by Conditional Formatted, see here: (Note: read the entire thread to make sure you cover all issues)