Hello littlefoot,

Try this:

=IF(COUNT(A1:B1)=2,SUM(A1:B1)/2,SUM(A1:B1))

Let me know if this works!

Steve