You can append columns in Excel using the CONCATENATE
function (or the &
operator), or using Power Query. Here's how to do it using both methods:
Method 1: Using the CONCATENATE Function (or the & Operator)
This method is suitable for simpler appending tasks.
-
Choose a Target Column: Decide in which column you want the appended result to appear. Let's say you want to append columns A, B, and C, and place the result in column D.
-
Enter the Formula: In cell D1, enter the following formula:
- Using the
CONCATENATE
function:=CONCATENATE(A1,B1,C1)
- Using the
&
operator:=A1&B1&C1
- Using the
-
Explanation:
CONCATENATE(A1,B1,C1)
joins the text in cells A1, B1, and C1 together.A1&B1&C1
achieves the same result using the ampersand (&) operator, which is a more concise way to concatenate.
-
Copy and Paste (or Drag): Click and drag the small square at the bottom-right corner of cell D1 down to apply the formula to the remaining rows in your data set. Alternatively, you can copy cell D1, select the range of cells you want to apply the formula to (e.g., D2:D100), and paste.
Example:
Column A | Column B | Column C | Column D (Appended) |
---|---|---|---|
John | Doe | 123 | JohnDoe123 |
Jane | Smith | 456 | JaneSmith456 |
Adding Spaces or Separators:
If you want to add spaces or other characters between the appended values, include them in the formula:
=CONCATENATE(A1," ",B1," - ",C1)
(Adds a space and " - " separator)=A1&" "&B1&" - "&C1
(Same result using the&
operator)
This would result in:
Column A | Column B | Column C | Column D (Appended with Separators) |
---|---|---|---|
John | Doe | 123 | John Doe - 123 |
Jane | Smith | 456 | Jane Smith - 456 |
Method 2: Using Power Query (Get & Transform Data)
Power Query is a more powerful tool for data manipulation, especially when dealing with more complex scenarios or large datasets.
-
Select Your Data: Select your data range in Excel. Ensure your data has headers.
-
From Table/Range: Go to the "Data" tab on the ribbon and click "From Table/Range." This will open the Power Query Editor.
-
Select Columns to Merge: In the Power Query Editor, select the columns you want to append (e.g., Column A, Column B, Column C). You can select multiple columns by holding down the Ctrl key while clicking.
-
Merge Columns: Right-click on one of the selected column headers and choose "Merge Columns."
-
Separator (Optional): In the "Merge Columns" dialog box:
- Choose a separator if you want one (e.g., Space, Comma, Custom).
- If you choose "Custom," enter the separator you want to use.
- Give the new merged column a name (e.g., "AppendedColumn").
-
Click OK: Click "OK" to merge the columns.
-
Load to Excel: Go to "File" -> "Close & Load" (or "Close & Load To...") to load the transformed data back into Excel. You can choose to load it to a new worksheet or an existing one.
Benefits of Power Query:
- Repeatable Transformations: The steps you take in Power Query are saved, so you can easily refresh the data and reapply the same transformations later.
- Data Cleaning: Power Query offers a wide range of data cleaning and transformation options.
- Handles Large Datasets: Power Query is generally more efficient for processing large datasets compared to using formulas.