Maybe this will work?
Select B2:U23 and invoke Conditional Formatting|Manage Rules.
Delete any current rules.
Then apply New Rule.
Select Use formula to determine which cells to format and enter formula:
=AND(B$1<>"PPS",$V2="Sell",ISNUMBER(B2),(B2-LOOKUP(2,1/(($V$2:$V2="BUY")*(ISNUMBER(B$2:B2))),B$2:B2))<0)
then click Format and choose Red from the fill menu.
then click Ok.
Click New rule and repeat above with formula:
=AND(B$1<>"PPS",$V2="Sell",ISNUMBER(B2),(B2-LOOKUP(2,1/(($V$2:$V2="BUY")*(ISNUMBER(B$2:B2))),B$2:B2))>0)
and colour Green.
Does that work?
Bookmarks