How to combine first and last name in excel
Tutor 5 (70 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
Combining first and last names in Excel can be done using formulas, Flash Fill, or Power Query
Using the Ampersand (&) Operator
The ampersand method is a quick way to join text strings:
-
Place the first name in A2 and last name in B2.
-
Enter the formula
=A2 & " " & B2
Press Enter to see the combined result.
Tips:
-
- Add middle names or titles by extending the formula:
=A2 & " " & B2 & " " & C2
Using the CONCATENATE Function
CONCATENATE joins multiple text strings into one cell:
=CONCATENATE(A2," ",B2)
Each text element is a separate argument, with spaces in quotation marks.
Limited to 255 arguments.
Using the CONCAT Function
CONCAT replaced CONCATENATE in Excel 2016+:
=CONCAT(A2," ",B2)
A2:B2) instead of individual cells.Using TEXTJOIN for Multiple Names
TEXTJOIN is ideal for combining multiple rows or columns:
=TEXTJOIN(" ",TRUE,A2:B2)
Delimiter: " " (space)
Ignore empty cells: TRUE
Range: A2:B2
Example: Combine 100 names into a comma-separated list:
=TEXTJOIN(", ",TRUE,A2:B101)
Handling Different Name Formats
-
Last Name, First Name:
=B2 & ", " & A2
- First Initial and Last Name:=LEFT(A2,1) & ". " & B2
- Full Name with Middle Initial:=A2 & " " & LEFT(B2,1) & ". " & C2Removing Extra Spaces
-
Wrap formulas in
TRIMto eliminate leading/trailing spaces:
Converting Formulas to Values
-
Copy the cells with combined names.
-
Right-click the destination.
-
Select Paste Special > Values (Ctrl+Alt+V on Windows, Cmd+Ctrl+V on Mac).
Flash Fill Alternative
Flash Fill recognizes patterns without formulas:
-
Type the first combined name manually in C2.
-
Start typing the second name in C3.
-
Press Ctrl+E (Windows) or Cmd+E (Mac) to fill the remaining cells.
Enable Flash Fill:
-
Windows: File > Options > Advanced > Automatically Flash Fill
-
Mac: Excel > Preferences > Edit > Enable AutoComplete for cell values
Power Query Method
-
-
Power Query efficiently combines large datasets:
-
Select your data range.
-
Go to Data > From Table/Range.
-
Select Add Column > Custom Column.
-
Enter:
=[First Name] & " " & [Last Name]
Click OK to generate the combined column.
Power Query preserves original data and updates dynamically when source data changes.
Common Errors and Solutions
-
#NAME? Error: Check spelling of functions or Excel version compatibility.
-
#VALUE! Error: Convert numbers to text using
TEXTfunction:=A2 & " " & TEXT(B2,"0")
Missing Spaces: Add
" "between cell references.Blank Cells Creating Extra Spaces: Use
IFto handle empty cells:=IF(A2="","",IF(B2="",A2,A2 & " " & B2))
-
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to add secondary axis in excel
Answers · 1
How to switch columns to rows in excel
Answers · 1
How to subtract on excel
Answers · 1
How to combine two cells of text in excel
Answers · 1