Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Adding Diagonal Borders.

Adding Diagonal Borders

Written by Allen Wyatt (last updated October 17, 2020)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


5

Excel allows you to add all sorts of borders to cells in a worksheet. You can place borders on the left, right, top, and bottom of a cell. If you select a range of cells, you can add borders to the left, right, top, bottom, and in between, meaning that the borders could be between cells within the selected range.

Many people don't realize that you can also place diagonal borders. This means that a border can appear from the top-left to the lower-right corners of a cell, or from the top-right to the lower-left. To take advantage of diagonal borders, follow these steps:

  1. Select the cell you want to have the diagonal border.
  2. Display the Home tab of the ribbon.
  3. Click the Format tool (in the Cells group) and then click Format Cells. Excel displays the Format Cells dialog box.
  4. Make sure the Border tab is selected. (See Figure 1.)
  5. Figure 1. The Border tab of the Format Cells dialog box.

  6. At the bottom left and right corners of the Preview area of the dialog box you should see buttons that have diagonal lines on them. Click the line that represents the type of diagonal border you want to use.
  7. Click on OK.

Diagonal borders can only be applied to cells, not to rectangular areas you select onscreen. For instance, if you choose cells A5:C12, the diagonal border won't go from the top-left corner of cell A5 to the bottom-right corner of cell C12. Instead, it is applied to the individual cells within the selected range.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6152) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Adding Diagonal Borders.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Backing Up Your Customized Toolbars

After customizing your Excel toolbars, it is a good idea to make a backup of the file that contains the information. ...

Discover More

Disabling Moving Between Worksheets

If you want someone to not be able to move from one worksheet to another in a workbook, you've got your work cut out for ...

Discover More

Controlling Formula Reference Jumping

When you select a cell, you typically do so to see what the cell contains to to make changes to the cell. How Excel ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Changing to a Non-US Date Format

Do you want to specify your months and days differently when displaying dates in your worksheets? This tip looks at how ...

Discover More

Professional Looking Fractions

Professional typesetting has, in many ways, spoiled us. One way this is evident is in the preference we show for making ...

Discover More

Formatting for Hundredths of Seconds

When you display a time in a cell, Excel normally displays just the hours, minutes, and seconds. If you want to display ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is three minus 2?

2020-10-19 07:27:38

Mike D.

Allen Quote "Diagonal borders can only be applied to cells, not to rectangular areas you select onscreen."

Actually you can draw a slanted line through an area with a little work. Simply select the diagonal cell using the control key and the left mouse button.
Then format the cell with the diagonal line of choice, voila!
If you want an 'X' than select the opposite diagonal cells and the opposite diagonal line and presto, you have an 'X'.

I highlighted all the cells and put a full border around it to highlight the 'Xed' out cells.
Of course it does have some limitations with the shape of the rectangle, but it will work for some.

(see Figure 1 below)

Figure 1. 


2020-10-18 17:09:05

Allan

Roy, you win with 4 steps.
Michael 5 steps
Allan 6 steps
Note: In Roy's plan, Ctl-1 must be done with the numeric row at the top of keyboard. The numeric key pad did not work.


2020-10-17 23:14:12

Roy

@Allan: Um, I guess you mean simpler than the tip. Not "simple" but "simpler than (fill in the blank)"?

For "simple" select the cell, press Ctrl-1, borders, and click the diagonal control. Couple steps to the thing to click beats four steps and not using the Ribbon for anything buried in its sub-menus is absolutely simpler and less work. If it's in the top level of the Ribbon menuing (yeah, its a menu, not something unique MS), that still takes a pair of clicks if you hate having a menu that covers an eighth of the screen, or more.

By the way, of course one can have diagonals in a range, but you have to select the cells it goes in using Ctrl-click and format, or format one, then copy and paste to the others. Last is easiest, but hard to do if you have content and/or they are not uniformly formatted.


2020-10-17 18:25:13

Michael G Bennett

Not in excel 2007.

Right click --- Format Cells ---> Border tab ......... then the rest


2020-10-17 15:32:40

Allan

Here's a simpler way.
Rt clk cell>Borders down arrow>More Borders>Border tab>Select a diagonal border


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.