How to Use the CONCATENATE Function in Excel
Today, we’ll delve into the CONCATENATE function in Excel and Google Sheets. This function is designed to merge the contents of two or more cells into a single cell.
Basic Syntax
The syntax for the CONCATENATE function in Excel is:
=CONCATENATE(text1, [text2], ...)
Although Google Sheets supports the same CONCATENATE function, it’s generally advisable to use the “&” operator for concatenation:
=text1 & [text2] & ...
Examples of Usage
To better understand the CONCATENATE function’s application in Excel and Google Sheets, let’s examine a few practical examples.
Example 1: Basic Concatenation
In this scenario, we have a first name in cell A2 and a last name in cell B2. Our goal is to concatenate these two cells to display a full name in cell C2.
A | B | C |
---|---|---|
First Name | Last Name | Full Name |
John | Doe | =CONCATENATE(A2, ” “, B2) |
In Google Sheets, the equivalent formula is:
=A2 & " " & B2
Example 2: Concatenating with Line Break
At times, you might need to concatenate text with a line break between elements. For instance, to display an address over multiple lines, you would concatenate the components line by line.
A | B | C |
---|---|---|
Street | City | Address |
123 Main St | Springfield | =CONCATENATE(A2, CHAR(10), B2) |
The corresponding formula in Google Sheets is:
=A2 & CHAR(10) & B2
These illustrations showcase how the CONCATENATE function in Excel and Google Sheets can be effectively used to combine names, addresses, or other text-based data with ease.
With this understanding, you can begin applying the CONCATENATE function in your spreadsheets, simplifying the way you manipulate and present data.
More information: https://support.microsoft.com/en-us/office/concatenate-function-8f8ae884-2ca8-4f7a-b093-75d702bea31d