How to Create Diagonal Lines in a Cell in an Excel Spreadsheet

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
Unlike diagonal borders, drawn lines require manual readjustment when cell sizes change.
Image Credit: Rudyanto Wijaya/iStock/Getty Images

A single diagonal line within a Microsoft Excel table cell communicates that the cell has two values or no information. Two diagonal lines mark outdated information with an X. Use one of three options to create these lines: a border format, cell style or line graphic.


Format an Individual Cell

Click the cell and in the Cells group of the "Home" tab, choose the "Format" button, followed "Format Cells." On the subsequent screen, click the "Border" tab. Depending on the slash direction you want, pick one of the two diagonal border buttons available under Border. Then, click "OK" to apply it.


Video of the Day

Create a New Cell Style

Place your cursor in a blank cell and then navigate to the Styles group on the Home tab. Click the "Cell Styles" button and choose "New Cell Style." In the subsequent screen, name your new style -- for example, SlashLeft or SlashRight -- and then click "Format." Select the "Border" tab and click either of the two diagonal border buttons under Border. Then, click "OK." To apply the slash afterward, simply click the "Cell Styles" button, followed by your new style's name under Custom.



Draw a Slash

Choose the "Insert" tab, followed by the "Shapes" button in the Illustrations group. Choose the "Straight Line" drawing option under Lines. Draw a diagonal line within a cell by clicking and dragging your cursor from one corner to another. Use the line's end points to adjust its length and angle.



references & resources

Report an Issue

screenshot of the current page

Screenshot loading...