if cell is empty the condition is false.
return average of the four cell.
if cell is has a value the condition is true,
return sum of the four cell.
why it also add the input number supposed to be the answer is 380.
Thanks for reaching out.
It seems that since you are having no empty cell (ref. the second screenshot), then the third argument of the IF() function is applied (a SUM() operation). That's why Excel returns the sum of all values in cell B9.
Hope this helps.