见截图
B1输入
=IF(COUNTIF(A1:B1,"<>")=2,"",IF(A1="",B1,A1))
下拉
输入
=IF(COUNTA(A2:B2)=2,"",SUM(A2:B2))
详见附图示例
=IF(A1<>"",IF(B1<>"","",A1),IF(B1<>"",B1,""))