Reputation: 85
There are two cells A2 and B2.
If
the cell B2 isn't empty, then concatenate A2 and B2 separated by a ',' (A2,B2)
else
have A2 alone
Upvotes: 0
Views: 5965
Reputation: 46331
Try this formula
=A2&IF(B2="","",","&B2)
Upvotes: 1
Reputation: 234635
Put, in any cell,
=IF(ISBLANK(B2), A2, A2 & "," & B2)
Upvotes: 3