Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Help and How-to
Search
Search
 
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

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

  3. Press CTRL+C.
  4. In the worksheet, select cell A1, and press CTRL+V.
  5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.

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 CDEF
First name Last name Street addressCityStateZip code
Robert Walters 4567 Main St.BuffaloNY98052
FunctionDescription
=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

advertisement