Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Put Border Lines in Excel: Step-by-Step Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To put border lines in Excel, select the cells you want to outline, go to the Home tab, click the Borders dropdown in the Font group, and choose a border style such as Outside Borders or All Borders. You can also open Format Cells (Ctrl+1 on Windows, Command+1 on Mac) and use the Border tab for precise control over line style, color, and which edges get a line. That's the short answer; the rest of this guide covers the exact clicks, the common pitfalls, and how to fix borders that refuse to appear.

What You'll Need

  • Microsoft Excel for Windows, Mac, or the web (the ribbon layout is similar across all three; labels can differ slightly by version, device, or region).
  • A spreadsheet with data or a blank sheet where you want borders.
  • Optional: a mouse or trackpad for selecting ranges; keyboard shortcuts work too.

Step-by-Step

  1. Select the cells. Click and drag to highlight the range you want to border. To select non-adjacent cells, hold Ctrl (Windows) or Command (Mac) while clicking. To border an entire row or column, click the row number or column letter.
  2. Open the Borders menu. On the Home tab, find the Font group. Click the small arrow next to the Borders button (it looks like a square divided into four). A dropdown gallery appears.
  3. Choose a preset. For a quick outline around the whole selection, pick Outside Borders. For lines between every cell, pick All Borders. For only horizontal lines, pick Bottom Border or Top Border as needed. The preset applies immediately.
  4. Fine-tune with Format Cells (optional). Press Ctrl+1 (Windows) or Command+1 (Mac) to open Format Cells. Go to the Border tab. Here you can pick a line style (thin, thick, dashed, double), a color, and then click the diagram's edges or the preset buttons (Outline, Inside) to apply. Click OK to confirm.
  5. Use the Format Painter for consistency. If you already bordered one cell and want the same look elsewhere, select the bordered cell, click Format Painter (Home tab, Clipboard group), then drag over the target cells.
  6. Remove borders when needed. Select the cells, open the Borders dropdown, and choose No Border. This clears all border lines from the selection.
  7. Check in Print Preview. Borders that look fine on screen may not print if the print area or page setup excludes them. Go to File > Print (or Ctrl+P) and confirm the lines appear in the preview.

Common Mistakes

  • Bordering only one cell instead of the range. If you click a single cell and apply All Borders, only that cell gets lines. Select the full range first.
  • Confusing borders with gridlines. Excel's default gridlines are light gray screen guides; they do not print unless you enable Print Gridlines in Page Layout. Borders are actual formatting that prints and travels with the file.
  • Applying a border color that matches the fill. If the cell fill is white and the border color is also white, the lines seem invisible. Check the border color in Format Cells > Border.
  • Using the wrong border button. The Borders button has a dropdown arrow; clicking the main button applies the last-used border, which may not be what you expect. Always open the dropdown to choose deliberately.
  • Forgetting merged cells. Borders around merged cells can behave oddly; apply borders before merging, or unmerge, border, and remerge if lines look broken.

Tips

  • Use thick outside borders and thin inside borders for a clean table look: select the range, apply All Borders, then apply Outside Borders with a thicker line style via Format Cells.
  • Keyboard shortcut lovers: Alt+H, B opens the Borders dropdown on Windows. On Mac, there is no default single-key border shortcut, but you can add one via Tools > Customize Keyboard.
  • To border every other row (banded rows), use Conditional Formatting with a formula, or apply borders manually to alternating rows. Excel's built-in table styles (Insert > Table) add banded formatting automatically, but those are table styles, not cell borders.
  • If you need borders on many sheets, create a cell style: Home tab > Cell Styles > New Cell Style, include the border formatting, then apply it anywhere.
  • Borders copy with cells when you copy and paste. If you want to paste values only without borders, use Paste Special > Values.

Troubleshooting

  • Borders don't appear at all. Check that you selected the right cells and that the border color isn't white. Also confirm the worksheet isn't in Page Break Preview with gridlines hidden; switch to Normal view (View tab > Normal).
  • Borders appear on screen but not in print. Go to Page Layout > Sheet Options and ensure Print Gridlines is off (borders are separate). Then check File > Print preview; if borders are missing, the print area may exclude those cells. Clear the print area (Page Layout > Print Area > Clear Print Area) and try again.
  • Only some edges get lines. The preset you chose may only apply certain edges. Use Format Cells > Border and click each edge in the diagram to add lines exactly where you want them.
  • Borders look uneven after inserting rows. Inserted rows inherit formatting from above, but if not, reapply borders to the new range. To keep borders consistent, format your data as a table (Insert > Table) and use table styles, or copy a bordered row and use Insert Copied Cells.
  • Borders disappear when you change the cell style. Applying a different cell style can override border formatting. Reapply borders after changing styles, or edit the style to include borders.
  • Can't find the Borders button. If the Excel window is narrow, the Font group may collapse. Widen the window or click the Font group's dialog launcher (small arrow at the bottom-right of the group) to open Format Cells directly.

Frequently Asked Questions

How do I add borders to all cells in a worksheet at once?

Click the Select All button (the square at the top-left corner where row 1 and column A meet), then apply All Borders from the Borders dropdown. This borders every cell in the used range and beyond, which can slow down large sheets; for big files, border only the used range instead.

Can I save a border style for reuse?

Yes. Create a cell style: Home tab > Cell Styles > New Cell Style, name it, and include the border formatting. The style then appears in the Cell Styles gallery for any workbook.

Why do my borders print as double lines?

You may have both a cell border and a gridline printing, or overlapping borders from adjacent cells. Check Page Layout > Sheet Options and turn off Print Gridlines, then verify borders in Format Cells.

Do borders affect formulas or sorting?

No. Borders are formatting only; they don't change values, formulas, or sort order. However, sorting can move borders with the cells, so if borders look scrambled after a sort, reapply them to the sorted range.

How do I remove all borders from a sheet quickly?

Select the entire sheet (Ctrl+A or the Select All button), open the Borders dropdown, and choose No Border. This clears borders but leaves gridlines and other formatting intact.

Can I use borders in Excel for the web?

Yes. The Home tab in Excel for the web includes a Borders dropdown with the same common presets. The Format Cells dialog is more limited on the web; for full border control, use the desktop app.