In both cases we have too many levels of nesting.
Why do you need the AVERAGE? From what I understand from your formula
you are just getting the average of a single number, the one returned
by my formula. Your structure is:
=IF(COUNT(E3:N3)>2,AVERAGE(x),D3)
But x is only one number, the one returned by my SUM formula. Your
formula has 9 levels of nesting. If you remove the AVERAGE in the
following sketch, you will still have 8 levels, which is too many:
=IF(COUNT(E3:N3)>2,x,D3)
You can break the formula into two cells. One with my formula and the
other like the sketch above, where x will refer to the cell with my
formula. Write back if this is not an option.
Regards,
Kostis