Hi
One way would be to use a Function to return the colour of the cells in a column to the side of your extracted PT Data
Function GetColour(cell As Range) As Long
GetColour = cell.Interior.ColorIndex
End Function
In a column to the right of your PT data, enter something like
=Getcolour(C5)
and copy down as far as required.
Assuming this had been entered in M5 through M50 then use a Sumproduct formula like
=SUMPRODUCT((M5:M50=your_colour)*C5:C50)
substituting the colour index of the colour you want for your_color e.g. 6 for Yellow
To utilise the function, copy the 3 lines of code pasted
Alt+F11 to invoke the VB Editor
Insert> Module
Paste the code into the whire pane that appears
Alt+F11 to return to Excel
If you amend the colours, press F9 to get the function to recalculate.