when I30 is >40
then sum all cells (D23:27)>8 so in other words add each cell that is
greater than 8 like (d23-8)+(d24-8)+ and so on
then take that amount and sum it with d28 and d29

so for example D23=10
D24=8
D25=10
D26=10
D27=8
D28=8
D29=8
THEN THE SUM WOULD= 22
2 FROM D23
2 FROM D25
2 FROM D26
8 FROM D28
AND 8 FROM D29

YOUR HELP IS VERY MUCH APPRECIATED!