Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a some basic columns in Excel like this:

Full Name    |    First Name    |    Last Name
             |    Billy         |    Bob
             |    Sue           |    Anne
             |    Super         |    Man
             |    Joe           |

I want to merge the first name and last name together into the Full Name column, separated by a space.

Is there a macro or something that could do that?

Also in the case of Joe who doesn't have a Last name listed, could it just put Joe without a space at the end?

share|improve this question
up vote 4 down vote accepted

Try this in cell A2:


The trim should take care of that pesky space.

share|improve this answer
+1 More elegant than mine xD – Jerry Aug 13 '13 at 20:03
Also hint: put 4 spaces before the formula to get the markdown. – Jerry Aug 13 '13 at 20:09
@Jerry You can edit another user's post if you see some formatting issue or whatever. – Excellll Aug 13 '13 at 20:12
@Excellll I try to avoid edit other user's posts usually, unless strictly necessary ^^; – Jerry Aug 13 '13 at 20:16
@Jerry Its absolutely ok to edit those answers. Don't be afraid of it. The site encourages users to do so. – nixda Aug 13 '13 at 20:29

You can do this with a formula, e.g.:

=A1&" "&B1

This is joining A1 to what ever is quoted (in this case a space) with B1.

To handle a missing first or last name, you could use an IF statement.

share|improve this answer

You could use this formula, assuming that Full Name is in column A, First Name in column B and Last Name in column C, and you want the first name first.

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

Will work if either First Name or Last Name is missing.

EDIT: Overlooked a much simpler one to handle the spaces (credit to Wizard Prang)

=TRIM(B2&" "&C2)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.