Smart Systems for Home

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

How to Put a Border 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 a border 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. That applies a standard thin line instantly. For more control, open Format Cells (Ctrl+1 on Windows, Cmd+1 on Mac), go to the Border tab, and pick line style, colour, and which edges to draw. The steps below cover both the quick method and the detailed one, plus how to remove borders and fix common problems.

What You'll Need

  • Excel for Windows, Mac, or the web (Excel for Microsoft 365, Excel 2021, 2019, or 2016). The border controls are in the same place across these versions, though the exact icons and dialog wording can differ slightly by version and platform.
  • A workbook with at least one cell selected. No add-ins or special templates are required.

Step-by-Step

  1. Select the cells you want to border. Click and drag to highlight a range, or hold Ctrl (Windows) or Cmd (Mac) to select multiple non-adjacent ranges. Borders apply to the edges of the whole selection, not to each cell individually unless you choose an option like All Borders.
  2. Go to the Home tab. The Borders button sits in the Font group, next to the fill colour and font size controls. It looks like a small square divided into four quadrants.
  3. Click the arrow next to the Borders button to open the border menu. You will see options such as Bottom Border, Top Border, Left Border, Right Border, No Border, All Borders, Outside Borders, Thick Box Border, and More Borders.
  4. Choose a quick border. For a simple outline around the selected block, pick Outside Borders. To draw lines between every cell in the selection, pick All Borders. To underline just the bottom row (common for totals), pick Bottom Border. The border appears immediately.
  5. For custom borders, open Format Cells. Press Ctrl+1 (Windows) or Cmd+1 (Mac), or right-click the selection and choose Format Cells. Switch to the Border tab.
  6. Pick a line style and colour first. In the Line area, choose a style (thin, thick, dashed, double) and a colour from the Color dropdown. These settings apply to whatever border you draw next, so set them before clicking the preview.
  7. Click the edges in the preview diagram. The preview shows the selected range. Click the outer edges to add an outside border, or click the inner lines to add borders between cells. You can also use the preset buttons (Outline, Inside) to apply several edges at once.
  8. Click OK. The border is applied. If you need to adjust it, reopen Format Cells and change the line style or click the same edge again to remove it.
  9. To remove a border, select the cells, open the Borders dropdown, and choose No Border. This clears all borders from the selection.

Common Mistakes

  • Bordering only one cell when you meant the whole table. If you select a single cell and choose Outside Borders, you get a box around that cell only. Select the full range first.
  • Confusing gridlines with borders. Gridlines are the faint grey lines that appear on screen but do not print by default. Borders are actual formatting that prints and exports. If your table looks bordered on screen but prints blank, you likely have gridlines on and no borders applied.
  • Setting the line style after drawing the border. In Format Cells, the style and colour apply to the next border you draw. If you click the preview first and then change the style, the existing border does not update. Remove the border and redraw it, or select the edge again after choosing the new style.
  • Applying borders to merged cells. Merged cells can behave unpredictably with borders; the border may appear around the merged area rather than the original cells. Unmerge, apply borders, then merge again if needed.
  • Forgetting that borders copy with the cell. If you copy a bordered cell and paste it elsewhere, the border comes along. Use Paste Special > Values if you want the content without formatting.

Tips

  • Use keyboard shortcuts for speed. Alt+H+B opens the Borders menu on Windows. On Mac, Ctrl+Option+0 (zero) applies an outline border to the selection. These shortcuts vary by version, so check the tooltip if they do not work.
  • Draw borders manually with the Draw Border tool. In the Borders dropdown, choose Draw Border and drag along cell edges to draw lines exactly where you want them. Press Esc when finished. This is useful for irregular tables.
  • Use a table style instead of manual borders. If you convert your range to an Excel Table (Insert > Table), you can apply a built-in style that includes borders and banding. This keeps formatting consistent as you add rows.
  • Check print preview. Borders print, but gridlines do not unless you enable Print Gridlines in Page Layout. If you want a clean printed table, use borders and turn gridlines off.
  • Apply borders to entire rows or columns sparingly. Bordering a whole column can slow down large workbooks and make the sheet look cluttered. Border only the used range.

Troubleshooting

If borders do not appear after you apply them, check these in order:

  1. Confirm the cells are not white-filled. A white fill can hide a black border. Select the cells, open Format Cells > Fill, and set the background to No Color.
  2. Check that the border colour is not white. In Format Cells > Border, the Color dropdown may be set to white, which makes borders invisible on screen. Change it to Automatic or black.
  3. Look at the zoom level. At very low zoom, thin borders may not render. Zoom to 100% to check.
  4. Verify you are not in Page Break Preview. Borders still show there, but the display can be misleading. Switch to Normal view (View > Normal).
  5. If borders disappear when you reopen the file, the workbook may be saved in a format that does not preserve all formatting, such as CSV. Save as .xlsx instead.
  6. If the Borders button is greyed out, the sheet may be protected. Go to Review > Unprotect Sheet (you will need the password if one was set).

If none of these help, try copying the content to a new workbook and applying borders there. This rules out file-specific corruption.

Frequently Asked Questions

How do I add borders to multiple non-adjacent ranges at once?

Hold Ctrl (Windows) or Cmd (Mac) while selecting each range, then apply the border from the Borders dropdown. The border is applied to each selected range individually.

Can I save a border style for reuse?

Excel does not have a direct “save border style” feature. The closest option is to format a cell with the borders you want, then use the Format Painter to copy that formatting to other cells. Alternatively, create a cell style (Home > Cell Styles > New Cell Style) that includes the border settings.

Why do my borders not print?

Borders print by default, but if you see nothing, check that the border colour is not white and that the print area includes the bordered cells. Also confirm that “Draft quality” is not enabled in Page Setup, as it can omit some formatting.

How do I remove all borders from a worksheet at once?

Select the entire sheet (click the triangle at the top-left corner of the grid), then choose No Border from the Borders dropdown. This clears borders from every cell.

Do borders affect sorting or filtering?

No. Borders are formatting only and do not change how data sorts or filters. However, if you sort a range with borders, the borders move with the cells, which can produce unexpected outlines. Convert the range to a table for more predictable formatting.

Can I use borders in Excel for the web?

Yes. The Borders dropdown is available on the Home tab in Excel for the web, with the same common options. The full Format Cells dialog is also available, though some advanced line styles may differ from the desktop version.