Using Textboxes to Combine Row & Column Headings in a Single Cell
The video guide shows how you can split a single cell with a diagonal line, and then enter text that appears either side of the line. The example of a line from the bottom left of a cell to the top right works well for entering a table heading distinct from a row or column description. The alternative option of adding a border from the top left to bottom right can be used to visually separate a description of the header row and first column of a table.
The video shows the second row of text being positioned manually because it is not possible to simultaneously left-align and right-align different rows of text within the same cell. If you need to adjust the column width, this may result in you needing to re-position your labels. A more sophisticated technique adds a diagonal border as before but then places the two labels in separate textboxes housed within the cell. If you specify the textboxes have no fill or border line, you will be able to see the diagonal border embedded in the cell. You should then re-define the textboxes as running from the top left to just beyond the bottom right of your cell, so the textboxes automatically re-size with the associated cell. A textbox set to move and re-size with cells that covers cell A1 but spills slightly into cell B2 will always cover cell A1.
You can set the text alignment independently for each of your textboxes then, provided there is sufficient space for each text label to fit between the cell borders and the diagonal line, the pieces of text will appear as if tied to the corners of cell A1. If you are not completely happy with the appearance, you can even format the textboxes and adjust the interior margins.
A further complication is that both textboxes are now occupying the same space so you can only select the one that sits on top. To make edits to the lower textbox, you first have to right-click on the top textbox and select 'Send to Back' to move it behind the other textbox. As both textboxes are transparent and you are not looking to overlay their text, it does not matter which one is on top.
By Ed Bolton, founder of Excel4Business Ltd. Last reviewed October 2026.
