Adding borders in Excel is a quick way to make your data stand out, separate sections, or create a clean, printable table. You can apply borders to a single cell, a range, or an entire worksheet using the Borders button on the Home tab. The fastest method is to select your cells, click the Borders dropdown arrow, and choose a style like All Borders or Outside Borders.
What You’ll Need
- Microsoft Excel (Microsoft 365, Excel 2021, 2019, 2016, or Excel for the web). Steps are similar for Mac and Windows.
- A worksheet with data you want to format.
- No special add-ins or tools are required.
Step-by-Step
- Select the cells where you want borders. Click and drag over a range, or click a single cell. To select the entire sheet, click the triangle where the row and column headers meet (top-left corner).
- Go to the Home tab on the ribbon. In the Font group, you’ll see the Borders button (it looks like a square divided into four quadrants) with a small dropdown arrow next to it.
- Click the dropdown arrow next to the Borders button. A menu opens with several preset border options: Bottom Border, Top Border, Left Border, Right Border, No Border, All Borders, Outside Borders, Thick Box Border, and more.
- Choose a border style. For a standard grid, pick All Borders. For only the outer edge of the selection, pick Outside Borders or Thick Box Border. The border is applied instantly.
- To customize line style and color, click the dropdown arrow again and select More Borders (at the bottom of the menu). This opens the Format Cells dialog box on the Border tab.
- In the Format Cells dialog, choose a line style (solid, dashed, dotted, thick) from the Style list, and a color from the Color dropdown. Then, use the preset buttons (None, Outline, Inside) or click directly on the border lines in the preview diagram to add or remove individual lines.
- Click OK to apply your custom border. The dialog closes and your selected cells update.
- To remove all borders from a selection, select the cells, go to the Borders dropdown, and choose No Border.
- For a quick keyboard shortcut: select the cells, then press Ctrl+Shift+& (Windows) or Command+Option+0 (Mac) to apply an outline border. To remove borders, press Ctrl+Shift+_ (Windows) or Command+Option+_ (Mac).
- If you’re using Excel for the web, the Borders button works the same way, but the More Borders option opens a simplified dialog with fewer style choices. Line color and style are still available.
Common Mistakes
- Applying borders to the wrong range: Double-check your selection before applying. Borders are added only to the selected cells.
- Using All Borders when you only want an outline: All Borders puts lines around every cell, which can look cluttered. Use Outside Borders for a clean outer edge.
- Forgetting that borders are part of cell formatting: When you copy or paste cells, borders may come along. Use Paste Special > Formats if you only want the border.
- Not using the preview in Format Cells: Clicking the border lines in the preview diagram is more precise than guessing which preset button to use.
Tips
- Use a consistent border style for a professional look. For example, use a thick outer border and thin inner borders for a table.
- Create a custom border style and save it as part of an Excel table style. Select your data, go to Insert > Table, and the table style applies borders automatically when you format as a table.
- Print borders correctly: If borders don’t appear when printing, check Page Layout > Sheet Options > Gridlines. Borders are separate from gridlines; gridlines are only on screen by default.
- Use the Format Painter to copy borders from one range to another. Select the cell with the desired border, click the Format Painter (Home tab), then click and drag over the target range.
- For a quick diagonal line (e.g., for a header cell), go to Format Cells > Border and click the diagonal line buttons in the preview.
Troubleshooting
- Borders not showing on screen: Make sure you’re not in Page Layout view with gridlines hidden. Go to View > Gridlines to toggle gridlines on/off for reference. Borders should always be visible regardless.
- Borders not printing: Check that the printer settings include background graphics or that the border color isn’t white. Also, ensure the print area includes the bordered cells.
- Borders disappear when sorting or filtering: This happens if you apply borders to a range that gets rearranged. Apply borders to the entire data range, or use an Excel Table (Insert > Table) which keeps formatting consistent.
- Custom border not applying correctly: In Format Cells, make sure you’ve selected the line style and color before clicking the border lines in the preview. If you click first, it uses the default style.
- Borders look different on Mac: The keyboard shortcut is different (Command+Option+0), but the menu path is the same. If the dialog looks different, it’s just the Mac version of Format Cells.
Frequently Asked Questions
How do I add a border to an entire row or column?
Click the row number or column letter to select the entire row/column, then apply borders as usual. Note that borders will only appear in cells that contain data or formatting; empty cells may show borders only if you apply them to the whole row/column.
Can I save a custom border style to reuse later?
Yes, you can save it as a cell style. Apply your custom border, then go to Home > Cell Styles > New Cell Style, give it a name, and it will appear in the Cell Styles gallery for future use.
Why do my borders disappear when I merge cells?
When you merge cells, the border of the merged cell takes on the border of the top-left cell. If you had borders on individual cells, they may not appear as expected. Reapply borders after merging.
How do I add a border to only one side of a cell?
Select the cell, go to the Borders dropdown, and choose Bottom Border, Top Border, Left Border, or Right Border. Or use Format Cells and click only the specific line in the preview.
Can I apply borders to multiple non-adjacent ranges at once?
Yes. Hold Ctrl (Windows) or Command (Mac) while clicking and dragging to select multiple ranges. Then apply borders as usual.
Is there a way to add a border to a cell based on a condition?
Yes, use Conditional Formatting. Select the range, go to Home > Conditional Formatting > New Rule, choose Use a formula, enter a formula like =A1>100, then click Format and set the border on the Border tab. This applies the border only when the condition is true.
Related
- The Data Entry Company: What They Do & How to Choose
- How to Use Random Numbers in Java
- How to Add and Multiply in One Excel Cell
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Word Label Template: Create, Format, and Save Your OwnTo create a new label template in Microsoft Word, open Mailings > Labels > Options > New Label,…
- How to Open the Text Import Wizard in Excel on WindowsTo open Excel’s legacy Text Import Wizard in Microsoft 365 for Windows, first enable it at File >…
- Excel Custom Number Formatting Syntax: A Clear GuideExcel custom number formatting uses format codes made from placeholders, symbols, and optional sections separated by semicolons. A…
- How to Make a Flowchart in Microsoft WordTo make a flowchart in Word, choose Insert > Shapes, add flowchart shapes to the page, and connect…
- Data Entry Jobs Chicago: Last Week’s OpeningsYes, data entry jobs in Chicago were actively posted in the last week, with dozens of new openings…
- How to Delete a Tab in Excel Without Losing Your DataTo delete a worksheet tab in Excel for Microsoft 365 on Windows, right-click the sheet tab at the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.