[Solved] Joining names if one is empty

Discuss the spreadsheet application
Post Reply
rbc
Posts: 51
Joined: Mon Jul 28, 2014 5:26 am

[Solved] Joining names if one is empty

Post by rbc »

I am trying to join a person's first name plus their maiden name and/or surname. My problem is when maiden name is empty, I'm not able to figure out the formula. The image contains the example and pseudo code (desired outcome) as well attempt at formula.

1) Mary + Brown + Smith (works)
or
2) Tom + Smith, where there is no maiden name
concatenate.png
Last edited by robleyd on Sat Sep 07, 2019 3:43 am, edited 1 time in total.
Reason: Tagged [Solved]
-------------
Mac OSX 10.1574 Catalina
According to topic 104522 rbc is switching from OpenOffice to LibreOffice
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Joining names if one is empty

Post by Zizi64 »

Please upload an ODF type sample file here.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
rbc
Posts: 51
Joined: Mon Jul 28, 2014 5:26 am

Re: Joining names if one is empty

Post by rbc »

Here's the sample file I took the snap from.
Attachments
concatenate.ods
(21.74 KiB) Downloaded 65 times
-------------
Mac OSX 10.1574 Catalina
According to topic 104522 rbc is switching from OpenOffice to LibreOffice
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Joining names if one is empty

Post by Zizi64 »

Code: Select all

=CONCATENATE(E3&" ";IF(ISBLANK(C3);"";C3&" ");A3)
concatenate_Zizi64.ods
(15.34 KiB) Downloaded 77 times
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Joining names if one is empty

Post by RusselB »

Alternative to Tibor's formula

Code: Select all

=E3&" "&if(isblank(C3);"";C3&" ")&A3
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
rbc
Posts: 51
Joined: Mon Jul 28, 2014 5:26 am

SOLVED Re: Joining names if one is empty

Post by rbc »

Zizi64 wrote:

Code: Select all

=CONCATENATE(E3&" ";IF(ISBLANK(C3);"";C3&" ");A3)
concatenate_Zizi64.ods
Thanks, that works.
-------------
Mac OSX 10.1574 Catalina
According to topic 104522 rbc is switching from OpenOffice to LibreOffice
Post Reply