=IF(I30>40,SUM(IF(D23

27>8,D23

27-8))+D28+D29,0)
which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Bianca" <(E-Mail Removed)> wrote in message
news:E45990E7-E38C-4447-97CB-(E-Mail Removed)...
> 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!