Search code examples
excelif-statementconcatenationms-office

Joining text with IF functions


I'm trying to make a spreadsheet that contains first names, preferred first names, and last names. First Name, Preferred Name, and Last Name are all in separate columns.

I want to populate a 4th column with the persons full preferred name, Joining either First Name with Last Name or Preferred Name with Last Name. How would i achieve this in excel?

Below is an example of what I would like the finished product to resemble.

First Name Preferred Name Last Name Full Name
John Doe John Doe
Billy Bill Clark Bill Clark
Joseph Clark Joseph Clark
Mary Bell Doe Bell Doe

Solution

  • Use:

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

    So if B2 is blank we choose A2. If B2 is not blank we choose B2. Then concatenate it with " " and whatever is in C2.

    enter image description here