# Concatenate two cells of data if and only if both reference cells contain data

I want the formula to concatenate two cells of data if and only if both reference cells contain data. If one or both reference cells is blank, then the cell with the formula should yield a blank value.

Here's my attempt at a formula:

``````=ifs(
isblank(E13) & isblank(C14), "",
not(isblank(E13)) & isblank(C14), "",
isblank(E13) & not(isblank(C14)), "",
not(isblank(E13)) & not(isblank(C14)),concat(C14,E13)
)
``````

This doesn't work because a TRUE-FALSE combo makes no sense in computer-speak. I saw this link Formula to grab specific cells and concatenate them together but only if they are not blank but found their solution does not work for my needs. I'm creating a Punnett-Square-esque concatenation table.

Here I tried just one condition. But this yields a non-blank value even when one reference cell is blank.

``````=ifs(
not(isblank(E13 & C14)),concat(C14,E13)
)
``````

I also tried this.

``````=if(not(isblank(\$C14)),Ifs(
not(isblank(\$D\$13)),concat(\$C14,\$D\$13)
),"")
``````

But the formula tells me "no match" when one or both cells are blank.

``````=IF(OR(ISBLANK(C14),ISBLANK (D25)),"",CONCAT(C14,D13))
`=IF((ISBLANK(C14)*ISBLANK (D25)),"",CONCAT(C14,D13)`)