How to Apply Borders in Excel: Step-by-Step

How-to basics · Updated November 29, 2026

Applying borders in Excel helps organize data, separate sections, and make tables easier to read. You can add borders to a single cell, a range, or an entire worksheet using the Borders button on the Home tab. The quickest way is to select your cells, click the Borders arrow (next to the gridlines icon) in the Font group, and choose a border style. For more control, use the Format Cells dialog (Ctrl+1) to customize line style, color, and placement. This guide walks you through every method, including how to draw borders manually and how to remove them.

What You’ll Need

  • Microsoft Excel 2010 or later (instructions for Microsoft 365 on Windows; Mac differences noted).
  • A worksheet with data you want to format.
  • Basic familiarity with selecting cells (click and drag, or Ctrl+click for non-adjacent).

Step-by-Step

  1. Select the cells where you want borders. Click and drag over the range, or click a single cell. To select an entire worksheet, click the triangle at the top-left corner (where row 1 and column A meet).
  2. Go to the Home tab on the ribbon. In the Font group, find the Borders button (it looks like a square divided into four quadrants, next to the Fill Color paint bucket).
  3. Click the small arrow next to the Borders button to open the border menu. You’ll see options like Bottom Border, Top Border, Left Border, Right Border, All Borders, Outside Borders, Thick Box Border, and more.
  4. Choose a border style. For a simple table, click All Borders to add lines around every cell in the selection. For a header row, click Bottom Border or Thick Bottom Border to underline the row.
  5. Customize with More Borders: To change line style or color, click More Borders at the bottom of the border menu. This opens the Format Cells dialog on the Border tab.
  6. In the dialog, pick a line style from the Style list (e.g., dashed, dotted, thick solid). Choose a color from the Color dropdown if you want something other than black.
  7. Select where to apply the border using the preset buttons (None, Outline, Inside) or click the individual border buttons (Top, Bottom, Left, Right, Inside Horizontal, Inside Vertical) in the Border preview area. The preview shows the result.
  8. Click OK to apply. Your selected cells now have the custom borders.
  9. Draw borders manually (optional): From the border menu, choose Draw Border or Draw Border Grid. Your cursor becomes a pencil. Drag over cells to add borders. Press Esc to exit drawing mode.
  10. Remove borders: Select the cells, open the border menu, and click No Border (the first option, usually a white square with a red diagonal line).

Mac difference: On Excel for Mac, the Borders button is also on the Home tab, but the menu is slightly different. Use Format > Cells > Border to access the same dialog. Keyboard shortcut Ctrl+1 on Windows becomes Cmd+1 on Mac.

Common Mistakes

  • Clicking the Borders button directly instead of the arrow: This applies the last border style used, which may not be what you want. Always click the arrow to see options.
  • 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 need outside borders: This adds lines between every cell, which can look cluttered. Use Outside Borders for a clean outline.
  • Forgetting to remove existing borders: If you apply a new border style, it replaces the old one, but only if you select the same cells and use the same border type. To fully change, remove borders first.
  • Printing without gridlines: Borders are visible on screen, but if you want gridlines to print, you must enable them in Page Setup. Borders are separate from gridlines.

Tips

  • Use keyboard shortcut Ctrl+Shift+& (Windows) or Cmd+Shift+& (Mac) to apply All Borders quickly. To remove all borders, use Ctrl+Shift+_ (underscore) on Windows.
  • Create a reusable border style by setting up a cell with the desired border, then use Format Painter (Home tab) to copy it to other cells.
  • For a professional look, use a thin black border for data and a thicker border for totals or headers.
  • Borders follow cell movement: If you copy or move cells, borders move with them. Use Paste Special > Formats to copy only borders.
  • Apply borders to an entire row or column by selecting the row/column headers first—this ensures new data added later also gets borders.
  • Use conditional formatting to auto-apply borders based on cell values (e.g., highlight overdue items with a red border). Go to Home > Conditional Formatting > New Rule > Use a formula.

Troubleshooting

  • Borders not showing on screen: Check that you haven’t applied a white border color. Select the cells, open More Borders, and ensure the color is not white. Also, if the cell fill is dark, borders may be hard to see—change fill or border contrast.
  • Borders don’t print: Borders should print by default, but if they don’t, go to Page Layout > Page Setup > Sheet tab and check that ‘Gridlines’ under Print is not the only thing you expect. Borders are separate; ensure you applied them. Also, check print preview.
  • Border appears on wrong side: In the Format Cells dialog, the border buttons toggle on/off. If a line doesn’t show, click the button again to activate it. The preview updates.
  • Can’t select More Borders: The option is at the bottom of the border menu. If it’s grayed out, you may have a protected sheet. Unprotect the sheet (Review > Unprotect Sheet) or ask the owner.
  • Drawing border tool leaves unwanted lines: Press Esc to exit drawing mode, then use the Erase Border tool (from the border menu, select ‘Erase Border’) to remove specific lines.
  • Borders disappear when sorting or filtering: This can happen if you filter and then clear. To keep borders, apply them to the entire data range before filtering, or use a table (Ctrl+T) which maintains formatting.

Frequently Asked Questions

Q: How do I apply a border to only the outside of a range?
A: Select the range, click the Borders arrow, and choose ‘Outside Borders’. This adds a border around the selection, not between cells.

Q: Can I apply multiple border styles in one selection?
A: Yes. Use the Format Cells dialog. For example, set a thick border for the outer edge and a thin dashed line for the inside. Select the style, then click the appropriate border buttons.

Q: How do I remove only some borders from a cell?
A: Select the cell, open Format Cells > Border tab, and click the specific border button to toggle it off. For example, click the bottom border button to remove just that line.

Q: Is there a way to apply borders to all cells with data automatically?
A: Yes, use conditional formatting. Select your data range, go to Home > Conditional Formatting > New Rule > Use a formula. Enter a formula like =A1<>"" (assuming A1 is the active cell), click Format, go to Border tab, choose your border, and OK. This applies borders to any cell that is not empty.

Q: Why do my borders look different when I print?
A: Print scaling can affect border thickness. Check print preview and adjust scaling (Page Layout > Scale to Fit). Also, ensure your printer settings aren’t set to ‘Draft’ mode, which may ignore some formatting.

Q: Can I copy borders from one cell to another?
A: Yes, use Format Painter. Select the cell with the desired border, click the Format Painter icon (Home tab), then click the target cell. For multiple cells, double-click Format Painter to lock it.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.