Microsoft KB Archive/50886

{| = Excel AppNote: Text Concatenation (ME0197) =
 * width="100%"|

Last reviewed: October 7, 1997

Article ID: Q50886 1.00 1.03 1.04 1.06 1.50 2.20 3.00 MACINTOSH kbappnote ME0197 kbother The information in this article applies to:


 * Microsoft Excel for the Macintosh, version 1.x, 2.x, 3.0

SUMMARY
The application note &quot;Text Concatenation&quot; (ME0197) is now available from Microsoft Product Support Services. This application note describes how to use the special text operator &quot;&&quot; to concatenate (string together) several text values in Microsoft Excel.

You can obtain this Application Note from the following sources:


 * Microsoft Product Support Services

For complete information, see the &quot;To Obtain This Application Note&quot; section at the end of this article.

THE TEXT OF ME0197
Microsoft(R) Product Support Services Application Note (Text File) TEXT CONCATENATION Revision Date: 07/91 No Disk Included The following information applies to Microsoft Excel for the Macintosh, versions 1.0, 1.03, 1.04, 1.06, 1.5, 2.2, and 3.0. | INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY   | You can use the special text operator &quot;&&quot; to concatenate (string together) several text values. The following are examples of how concatenation can be used:
 * ACCOMPANY THIS DOCUMENT (collectively referred to as an Application|
 * Note) IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND, EITHER    |
 * EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED    |
 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR     |
 * PURPOSE. The user assumes the entire risk as to the accuracy and  |
 * the use of this Application Note. This Application Note may be    |
 * copied and distributed subject to the following conditions: 1) All|
 * text must be copied without modification and all pages must be    |
 * included; 2) If software is included, all files on the disk(s)    |
 * must be copied without modification (the MS-DOS utility diskcopy is|
 * appropriate for this purpose); 3) All components of this          |
 * Application Note must be distributed together; and  4) This       |
 * Application Note may not be distributed for profit.               |
 * Copyright 1990-1991(C) Microsoft Corporation. All Rights Reserved. |
 * Microsoft is a registered trademark of Microsoft Corporation.     |
 * Apple and Macintosh are registered trademarks of Apple Computer,  |
 * Incorporated.                                                     |
 * Incorporated.                                                     |

  Use the ampersand (&) to join two or more text values into a new text value. If cell A2 contains the text entry Jim, and cell B3 contains the text entry McDevit, use the following formulas: Formula            Text Value Produced --

=A2&B3             JimMcDevit =A2&&quot; &quot;&B3         Jim McDevit =B3&&quot;, &quot;&A2        McDevit, Jim =&quot;Mr. &quot;&B3&&quot;, &quot;&A2 Mr. McDevit, Jim   Use concatenation in combination with macro functions. For example, suppose you want to be able to open any of your monthly inventory worksheets by specifying the month of the inventory. The names of your monthly inventory worksheets vary by a string of text: Western.Jan, Western.Feb, Western.Mar, and Western.Apr. Use the INPUT command to specify the month, and use the following sequence of commands to concatenate the month with &quot;Western.&quot;: B6:  =SET.NAME(&quot;Month&quot;,INPUT(&quot;Enter the month:&quot;,2)) B7:  =OPEN(&quot;Western.&quot;&Month)

Entering the month in the proper format for the input dialog box will open the corresponding worksheet for that month.   Use concatenation in a macro to string together a formula and display the new formula in the formula bar. For example, if the active cell contains the number 2 and a macro is run containing the command =FORMULA(&quot;=&quot;&ACTIVE.CELL&&quot;*100&quot;) then the active cell will display 200, and the formula bar will display =2*100. 

TO OBTAIN THIS APPLICATION NOTE
You can have this Application Note mailed or faxed to you by calling Microsoft Product Support Services Monday through Friday, 6:00 A.M. to 6:00 P.M. Pacific time at (425) 635-7080. If you are outside the United States, contact the Microsoft subsidiary for your area. To locate your subsidiary, see the Microsoft World Wide Offices Web site at:

http://www.microsoft.com/worldwide/default.htm This file has been removed from the Software Library but can be requested by calling Microsoft Product Support Services.
 * }