Excel与IF条件连接

时间:2013-12-16 13:29:56

标签: excel

有两个单元格A2和B2。

如果

the cell B2 isn't empty, then concatenate A2 and B2 separated by a ','

(A2,B2)

其他

have A2 alone

2 个答案:

答案 0 :(得分:3)

放入任何单元格

=IF(ISBLANK(B2), A2, A2 & "," & B2)

答案 1 :(得分:1)

试试这个公式

=A2&IF(B2="","",","&B2)