Color the columns based on group and column value

I am using excel 2016, where I need to do some coloring based on group and a value in a particular column.

My input record is given below

enter image description here

My requirement is that within a group(Grouping is done based on COLA and COLd), if COLC have a value “CP”, then I need to highlight all the rows within that group.

My expected output is given below

enter image description here