Combine text in Excel using CONCATENATE
One of the most basic functions you may want to perform on strings in Excel is combining two or more strings of text into one long phrase. This operation is called concatenation, and is easily accomplished using Excel's
There are many reasons why you may want to combine text, but here are a couple of examples to get you thinking:
- You have
First Name andLast Name columns in a customer database, and want to combine them together to get customers'Full Name ; - You have a table with branch information listed by city and state, and you want to combine the
City andState columns into oneLocation column; or - You have a list of employee names, and want to combine them together to form a unique
E-mail address for each employee.
This list is just the tip of the iceberg; there are numerous reasons why you may want to use
The basic CONCATENATE function
To combine two fields of text in Excel, use the basic syntax of
=CONCATENATE (string_1 ,string_2 ...)
The function will take your inputs and combine them into one single string. Note that you can include as many arguments as you want at the tail end of
Here are a few examples of
=CONCATENATE ("Sarah" ,"Smith" )
Output:"SarahSmith"
=CONCATENATE ("Sarah" ," " ,"Smith" )
Output:"Sarah Smith"
=CONCATENATE ("Boston" ,"MA" )
Output:"BostonMA"
=CONCATENATE ("Boston" ,"," ," " ,"MA" )
Output:"Boston, MA"
=CONCATENATE ("ABC" ,"12" ,3 )
Output:"ABC123"
There are a couple of things to note here: first,
A shortcut for CONCATENATE: the ampersand (&)
Since
=string_1 &string_2 ...
Let's take another look at the above examples, this time using
="Sarah" &"Smith"
Output:"SarahSmith"
="Sarah" &" " &"Smith"
Output:"Sarah Smith"
="Boston" &"MA"
Output:"BostonMA"
="Boston" &"," &" " &"MA"
Output:"Boston, MA"
="ABC" &"12" &3
Output:"ABC123"
Save an hour of work a day with these 5 advanced Excel tricks
Work smarter, not harder. Sign up for our 5-day mini-course to receive must-learn lessons on getting Excel to do your work for you.
- How to create beautiful table formatting instantly...
- Why to rethink the way you do VLOOKUPs...
- Plus, we'll reveal why you shouldn't use PivotTables and what to use instead...