|Microsoft Office Excel 2003
Microsoft Excel 2002
This article is excerpted from Microsoft Office Excel 2003 Inside Out by Craig Stinson and Mark Dodge. Visit Microsoft Learning to buy this book.
Many times the label at the top of a column is much wider than the data stored in it. You can use the Wrap text option (Format menu, Cells command, Alignment tab) to make a multiple-word label narrower, but sometimes that's not enough. Vertical text is an option, but it can be difficult to read and takes a lot of vertical space. You may want to try using rotated text and cell borders instead, as shown in the following picture.
You may also want to use that pesky cell that generally remains empty in the upper left corner of a table. You can use an angled border to create dual-label corner cells like the one shown in the following picture.
Apply angled text and borders
- Select the cells you want to format.
- On the Format menu, click Cells.
- On the Border tab, apply vertical borders to the left, right, and middle of the range.
- On the Alignment tab, in the Orientation box, click a degree point, or drag the indicator to the angle you want.
Note It's usually best to select a positive angle between 30 and 60 degrees.
- Under Text alignment, in the Horizontal list box, click Center, and then click OK.
Excel rotates the left and right borders along with the text.
- To shrink all the columns to their smallest possible width, select them, point to Column On the Format menu, and then click AutoFit Selection.
Add an angled border to an empty cell
- Select the cell you want to format, and then type 10 space characters.
You can adjust this later, as needed. (For example, 20 spaces were needed before the Exam # label in the example above).
- Type the first label, which corresponds to the column labels across the top of the table.
- To create two line breaks in the cell, hold down ALT, and then press ENTER twice.
- Type the second label, which corresponds to the row labels down the left side of the table, and then press ENTER.
- With the cell selected, click Cells on the Format menu.
- On the Border tab, in the Line box under Style, select the line style you want.
- Under Border, click the upper left to lower right angled border button.
- On the Alignment tab, under Text control, select the Wrap Text check box, and then click OK.
Note You may need to fine-tune a bit by adjusting the column width and row height and by adding or removing space characters before the first label. In the example above, we also selected cells B3:F3, and then set the text alignment to Top in the Vertical box on the Alignment tab so that all the labels line up across the top of the table.