Software

Use diagonal borders to label Excel cells

It's easy to create a heading for column labels and a heading for row labels in the same Excel cell -- use diagonal borders. Here's how.
You can use diagonal borders to create a heading for the column labels and a heading for the row labels in the same Excel cell. For example, say you want to place the headings for the Regions column and the Sales columns in cell A3, as shown in Figure A. Follow these steps:

  1. Select cell A3.
  2. Press the spacebar eight times.
  3. Type Sales.
  4. Press [Alt][Enter] twice.
  5. Type Regions.
  6. Press [Ctrl][Enter].
  7. In Excel 2007, click on the Home tab, then click the drop-down arrow of the Borders button in the Font group.
  8. Click More Borders at the bottom of the list.
  9. Click the Border tab, and then click the lower right-hand icon in the Border section.
  10. Click OK.

Figure A

Figure A

If the word Sales is too close to the diagonal border, click before Sales in the formula bar, and press the spacebar a few more times.

Miss an Excel tip?

Check out the Microsoft Excel archive, and catch up on other Excel tips.

Help users increase productivity by automatically signing up for TechRepublic's free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.

21 comments
mpenny
mpenny

What the heck is diagonal? Your example has nothing in it that is diagonal. With the Sales/Region headers colored black, no borders of any type are visible.

maryb
maryb

This is awesome!! Thanks, Mary

plamanna
plamanna

The only problem with using the Ctrl+Enter method of creating a line break is the formatting if the the information is ever copied to another application (Word for example). The line breaks in the cell are read as a wing ding box. Using the Indent and wrapping the text will solve the wing ding issue.

Marshwiggle
Marshwiggle

I didn't have any problem adding the border in Excel 2003 (Format -> Cells -> Borders Tab), but it did take a while to get the initial 8 spaces to show. You must have Word Wrap turned on or "Regions" won't show, and the column must be wide enough or the spaces will get pushed to a row above "Sales."

jtorres
jtorres

I don't get it. Figure A doesn't show any diagonal borders at all. What is this supposed to be good for? Can't you just change the alignement of the cell to be at an angle and then add regular borders?

cjenning
cjenning

Couldn't see anything diagonal or different - didn't get it.

andrew.sudworth
andrew.sudworth

I've always wanted to do this but never could be bothered spending the time even searching on t'internet for a solution. I'm using creaking, but trusty old 2000 (yes, even 9 years later!) but I interpreted the instructions from the 2007 guidance. Cool.

hutchkl
hutchkl

I thought this was a useful tip. I tried it for a project at homne and it looked good.

charleswdavis6670
charleswdavis6670

Useless - unless your boss demands that you use them. Many people put demands on you that you can't fathom, but you must do it. This just shows that it can be done.

mcTrainer
mcTrainer

I agree that the image did not illustrate the purpose of the tip. Therefore- why include it. As for the Office 2003 or older instructions... they too should have been added (it's just an extra two sentences after all). Poorly explained. Too bad.

zx2zx
zx2zx

Figure A in the article had black fill hiding the border http://tinyurl.com/28fo86 One more not I had to use the left ALT key on my laptop

ThumbsUp2
ThumbsUp2

... is in the fact that you can type two lines of text with the alt+enter, then use the diagonal border between the words. The spacing is relative to your default cell width and font being used, so add/delete spacing as needed. The ctrl+enter will autofit the cell to the contents in both height and width. For versions pre-2007, the borders are in Format -> Cells -> Borders tab.

macbill
macbill

Unlike another reader, I'm not bright enough to "translate" the 2007 instructions into Office 2000. (It would also have been nice to mention that this was a 2007-only tip, but...) Is there any way you can send me the 2000 variation? (You have my email address.) Thanks for the tips, but don't forget the army of us out here still using Off.2000 - we own it, it works, it meets our needs, etc. Thanks.

Webguy007
Webguy007

You need more graphics (before and after shots). I think screenshots are the best way to learn (at least for me!).

paul.buhagiar
paul.buhagiar

Can you please send me the equivalent Excel 2000 method of using the diagonal borders technique?

ralphleask
ralphleask

Maybe you should be writing the Tips. As a number of other readers seem to have suggested, the whole purpose of the Tip was obscure until you enlightened us.

gstrobel
gstrobel

In Office 2003 I followed steps then I put my cursor right before the word Sales and backed spaced 2 times. This seemed to work great.

kmeyer
kmeyer

Hopefully this is close to the same method as Office 2000: Highlight the cell where you want the diagonal split, right click and select Format Cells.. Select the Border tab There are two diagonal border options at the bottom. (I used the one on the bottom right [\] to follow the original example) Click OK. Type some (10) spaces then your text, hit Alt+Enter twice then enter the bottom line of text.

sbacheler
sbacheler

I also have Office 2000 and could use it! Thanks! sbacheler@itgnetworks.com

nmctus
nmctus

The diagonal line in a cell in Excel 2002 can be drawn if you have the Border toolbar active under the View menu. Choose the draw icon in the border toolbar and it gives you a pencil to draw with.

Editor's Picks