XL: Pasting Text in Center Across Cells Format Returns 0
ID: Q98632
|
The information in this article applies to:
-
Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0
-
Microsoft Excel for the Macintosh, versions 4.0, 5.0
SUMMARY
In Microsoft Excel, when you format a cell with the Center Across Selection
option, the contents of one cell will be centered across multiple cells. In
this format, although the data appears to be contained in several cells,
the actual data can only be accessed from the original cell.
Although the information appears to span several cells, you can only
retrieve information from the original cell (the cell to which you applied
the Center Across Selection format). For this reason, operations, such as
the following, will not retrieve data from the cells that appear filled
(because of the formatting change):
- In the case of linking, the link will return a 0 (zero). This is
expected behavior when you link to an empty cell.
-and-
- If you attempt to use the Paste Link command (on the Edit menu) to
paste an area in which text has been formatted with the Center
Across Selection option, the array returned to the destination
sheet may look different than anticipated.
MORE INFORMATION
The array returned in the destination worksheet will display the text as if
the Center Across Selection option had been selected, but the text will be
truncated in the first cell of the centered selection. A 0 (zero) is
displayed in the other cells of the centered selection.
This is expected behavior because of the way Microsoft Excel handles
linking. When you link a document by choosing Paste Link from the Edit
menu, Microsoft Excel does not copy formatting and automatically puts a 0
in cells that are blank in the original region.
To display the information in the linked worksheet as it appears in the
source worksheet, do the following:
- Select only the individual cell that contains the aligned text on
the original (source) worksheet. Do not select the other cells that
the text is centered across.
- On the Edit menu, click Copy.
- Activate the destination worksheet.
- Select the destination cell.
- On the Edit menu, click Paste Link.
The information is pasted correctly, but does not take on the alignment of
the source cell. To align the information, do the following:
Excel 5.0
- Select the cells that you want to center the text across.
- On the Format menu, click Cells.
- Click the Alignment tab and select the Center across selection option
in the Horizontal dialog box.
Excel 4.0, 4.0a
- Select the cells that you want to center the text across.
- On the Format menu, click Alignment.
- Under Horizontal, select the Center Across Selection option.
- Click OK.
To see an example of this behavior, do the following:
- In cell A1, type "This is a test" (without the quotation
marks).
- Select cells A1 through C1.
- On the Format menu, click Alignment.
- Under Horizontal, select the Center Across Selection option.
- Click OK.
- On the Edit menu, click Copy.
- Activate a new worksheet.
- Select cell A1.
- On the Edit menu, click Paste Link.
The result will be text truncated in cell A1, and the value 0 (zero)
displayed in cells B1 and C1.
REFERENCES
"User's Guide 1," version 4.0, page 228
Additional query words:
Keywords : xlformat
Version : WINDOWS: 4.0, 4.0a, 5.0; MACINTOSH: 4.0, 5.0
Platform : MACINTOSH WINDOWS
Issue type : kbprb
Last Reviewed: April 6, 1999