I think wrong. The latter is no different from KZN's edit function and the former doesn't get recognised by the application.volatile line. I'll crawl back in my hole.
Use the SUMIF function and colour in the cells?
=SUMIF(A1:A5,"Blue",A1:A5) and =SUMIF(A1:A5,"Green",A1:A5)
EDIT - but easier would probably be to use another column with P and U and sumif based on those, I reckon.