When working with Excel and needing to combine characters from different data columns within a table, CONCATENATE function comes into play. It allows users to link each character from various columns and form a complete string as per the user's requirement. For instance, when dealing with tables containing Last Name, First Name, it's often accompanied by Last Name and First Name columns. This function will concatenate the two strings Last Name, First Name together instead of manually typing them based on those two columns. Instead of manually entering the full names of each person, this function can be used to merge Last Name and First Name from different columns into the complete name. And if you're unfamiliar with how to use this function, the following article will introduce the syntax and usage of CONCATENATE function. Invite readers to follow along.
How to employ CONCATENATE function to merge everything in Excel.
Guide to using CONCATENATE function in Excel - Illustrated examples
1. Functionality of CONCATENATE function in Excel
Used to concatenate multiple text strings into a single string. The strings being concatenated can be numbers, text, or cell references.
2. Syntax of CONCATENATE function in Excel
CONCATENATE (text 1, text 2, …)
Where:
Text 1: is the first string. Mandatory.
Text 2 …: optional. Can be up to a maximum of 255 strings. Strings must be separated by commas.
3. Some considerations when using CONCATENATE function in Excel
- You must use commas to separate Text arguments
- If you want to add spaces between words, you must add a Text argument of ' ' to keep the words apart
4. Using the '&' character to concatenate words in Excel
- In Excel spreadsheet, input the formula =(J8&' '&K8) into the reference cell where you want to display the result as shown in the figure.
Press Enter to display the result.
5. Illustrative example of CONCATENATE function in Excel
Example: Let's consider the following dataset.
Concatenating ordinary words
You input the formula into cell D5: =CONCATENATE(J8,K8)
The result appears
Concatenating words with additional spaces
You input the formula into cell D6: =CONCATENATE(J8,' ',K8)
The result appears
Concatenating words with added text characters
You input the formula into cell D7: =CONCATENATE(J9,K9,'.vn')
Result:
Using CONCATENATE function to concatenate numbers and dates in different formats
In Excel spreadsheet, you input the formula =CONCATENATE('Today is', TEXT(TODAY(),'mm/dd/yy')) into the reference cell where you want to display the result.
Result
Using CONCATENATE function to concatenate data with line breaks.
To use line breaks, you need to utilize the CHAR function (which returns a character specified by a numeric code) with the corresponding ASCII code to display the data with line breaks.
You can use the formula =CONCATENATE(J9,CHAR(10),K9)
Or the formula =J9&CHAR(10)&K9
Result:
Note: To display multiline strings in cells, you need to select Home => Wrap Text (Excel 2016) or press Ctrl +1 and select Wrap Text in the Alignment tab
6. Common errors when using CONCATENATE function
Error #NAME?
- Cause: If the text argument is a text string missing double quotation marks (''), the function will return an error #NAME?
For example, if you type into any cell with the formula: =CONCATENATE(a,v) then immediately the function will return the error #NAME?
- Fix method: Add double quotation marks before the first character and after the last character of the text string in the text argument.
Text display missing ' ', '.', or ','
- Cause: When concatenating strings, you may frequently encounter cases where the displayed result lacks spaces, periods, commas, etc., making the concatenated text not visually appealing.
- Fix method: Review your formula and add necessary characters to the text arguments of the function!
By now, you may have grasped the usage of Concatenate function, haven't you? With this function, you can concatenate character strings together, making calculations and operations on Excel spreadsheets easier. If you encounter any difficulties during the process, don't hesitate to comment below, Mytour's technical team will assist you.