Create a header cell with text separated by a diagonal line

In creating a table header that explains what the row and column values represent, a common approach is to use a cell with text separated by a diagonal line. This, first for me, video tutorial explains how.

For those who prefer a text explanation:

Format the cell “border” to add a diagonal from the left-top to the right-bottom (it’s one of the line choices in the Format Cells dialog box | Borders tab).

Then, type several spaces the literal Hours ALT+ENTER to create a newline in the text and then the literal Days.

Adjust the number of spaces before the literal Hours to get the desired effect.

An alternative, which is simple albeit crude, is to type Days space \ space Hours. {grin}

Tushar Mehta

5 thoughts on “Create a header cell with text separated by a diagonal line

  1. This isn’t quite like splitting cells or columns. It’s a hack that is limited especially in terms of formatting. The amount of text you can add in this cell is also limited. If you want to add more text, you might have to use a text box and insert it in the cell which will make managing the table all the more difficult. Use this sparingly or only if you have the time needed to fix the formatting.

Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published. Required fields are marked *