Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello,

try =IF(B2<>"";CONCATENATE(A2;" and";B2);A2) - but be absolutely sure that colum B doesn't contain anything (even not a space character), if there is no second name. Otherwise formula will fail.

See C:\fakepath\Husband-and-wife-Modified.ods

Hello,

try =IF(B2<>"";CONCATENATE(A2;" and";B2);A2) - but be absolutely sure that colum column B doesn't contain anything (even not a space character), if there is no second name. Otherwise formula will fail.

See C:\fakepath\Husband-and-wife-Modified.ods

Hello,

try =IF(B2<>"";CONCATENATE(A2;" and";B2);A2)and ";B2);A2) - but be absolutely sure that column B doesn't contain anything (even not a space character), if there is no second name. Otherwise formula will fail.

See C:\fakepath\Husband-and-wife-Modified.ods

Hello,

try =IF(B2<>"";CONCATENATE(A2;" and ";B2);A2) - but be absolutely sure that column B doesn't contain anything (even not a space character), if there is no second name. Otherwise formula will fail.

See C:\fakepath\Husband-and-wife-Modified.ods

Update 1 If you can't assure, that there are no withespaces in column B, you may use (example for cell C2): =IF(ISERROR(REGEX(B2;"^\s+$"));IF(B2="";A2;CONCATENATE(A2;" and ";B2));A2)

or you use the same regular expression (^\s+$) in Edit -> Find & Replace to get rid of white spaces.

Hello,

try =IF(B2<>"";CONCATENATE(A2;" and ";B2);A2) - but be absolutely sure that column B doesn't contain anything (even not a space character), if there is no second name. Otherwise formula will fail.

See C:\fakepath\Husband-and-wife-Modified.ods

Update 1 If you can't assure, that there are no withespaces white spaces in column B, you may use (example for cell C2): =IF(ISERROR(REGEX(B2;"^\s+$"));IF(B2="";A2;CONCATENATE(A2;" and ";B2));A2)

or you use the same regular expression (^\s+$) in Edit -> Find & Replace to get rid of white spaces.

Hello,

try =IF(B2<>"";CONCATENATE(A2;" and ";B2);A2) - but be absolutely sure that column B doesn't contain anything (even not a space character), if there is no second name. Otherwise formula will fail.

See C:\fakepath\Husband-and-wife-Modified.ods

Update 1 If you can't assure, that there are no white spaces in column B, you may use (example for cell C2): ):

=IF(ISERROR(REGEX(B2;"^\s+$"));IF(B2="";A2;CONCATENATE(A2;" and ";B2));A2)

or you use the same regular expression (^\s+$) in Edit -> Find & Replace to get rid of white spaces.