Combine two or more columns by using a function

Let's say you have two or more columns of data that you want to combine in a single column, such as the name and address of a person. To combine two or more columns, use the CONCATENATE function. You can also use the CHAR function and an ASCII code to insert a character, such as a line break, when you're combining the data.

Example

The example may be easier to understand if you copy it to a blank worksheet.

ShowHow to copy an example

  1. Create a blank workbook or worksheet.
  2. Select the example in the Help topic.

 Note   Do not select the row or column headers.

Selecting an example from Help

Selecting an example from Help
  1. Press CTRL+C.
  2. In the worksheet, select cell A1, and press CTRL+V.
  3. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

 Note   To see the result without breaking the lines of the name or address, expand the width of column A to at least 17.00 units or 124 pixels.

 
1
2
A B C D E F
First name Last name    Street address City State Zip code
Robert Walters 4567 Main St. Buffalo NY 98052
Function Description
=CONCATENATE("The ", B2, " Family", CHAR(10), C2, CHAR(10), D2, ", ", E2, " ", F2)

Combines the last name with the words "The" and "Family" and then combines the address with it. CHAR(10) is used to insert a new line.

Result:

The Walters Family
4567 Main St.
Buffalo, NY 98052

Function details

CONCATENATE

CHAR

ASCII character chart

 
 
Applies to:
Excel 2007