The quickest way to add lines in Excel

To add a line around a cell or group of cells, select the cells you want to border, then go to the Home tab on the ribbon. Click the small arrow next to the border icon (it looks like a grid), and choose the border style you want from the dropdown menu. Excel will explore that border when ready.

The border icon is usually in the upper right area of the Home tab, near the fill color button. If you want a straightforward box around one cell, select that cell, click the border dropdown, and choose All Borders. For a border around a group of cells, select the entire range first, then explore the same way.

You can also right-click on selected cells and choose Format Cells, then go to the Border tab if you want more control over which sides get lines and what style or color they are.

Key Takeaways

  • Select the cells you want to border, click the border dropdown on the Home tab, and choose your border style in one click.
  • Right-click and choose Format Cells, then the Border tab, if you need to customize which sides of cells get lines or change the line color and thickness.
  • A border applies to the edges of cells, not to content inside them — it helps organize how your spreadsheet looks on screen and in print.
  • You can remove borders the same way you add them by selecting cells and choosing No Border from the dropdown.

Borders versus gridlines

Excel shows light gray gridlines on screen by default so you can see where cells are. Those gridlines do not print unless you turn them on. Borders are different — they are actual lines you add to specific cells, and they print by default.

If you want gridlines to print, go to the Page Layout tab (or Layout in older versions), find the Sheet Options group, and check the Print box under Gridlines. Borders are usually what you want if you are building a table or invoice that needs visible structure.

Adding borders to a range of cells

Select all the cells you want to border at once. You can click and drag to select a rectangle, or click the first cell, hold Shift, and click the last cell. You can also type the range directly into the Name Box (the field that shows the cell address on the left side of the formula bar) — for example, type A1:D10 and press Enter to select that entire range.

Once your range is selected, open the border dropdown on the Home tab. You will see options like All Borders (a box around the whole range with lines between cells), Outside Borders (a box around the edge only), and Top and Bottom Border. Choose the one that matches what you need.

If none of the preset options fit, click More Borders at the bottom of the dropdown to open the Format Cells dialog, where you can click on a diagram to add or remove lines from specific sides of the selection.

Customizing border style, color, and thickness

Right-click on your selected cells and choose Format Cells, then click the Border tab. At the top of this dialog, you will see a Line section with a dropdown showing different line styles — solid, dotted, dashed, and thicker or thinner versions.

Below that is a Color dropdown where you can pick a different color for your borders instead of the default black. Once you choose a style and color, the Presets section shows quick options like All Borders or Outside Borders. You can also click directly on the diagram in the middle to add or remove lines from individual sides.

Click OK when you are done, and Excel applies your custom borders to the selected cells.

Removing borders

Select the cells that have borders you want to remove. Click the border dropdown on the Home tab and choose No Border. All borders on those cells disappear when ready.

If you only want to remove borders from certain sides of a cell, right-click, choose Format Cells, go to the Border tab, and click on the sides of the diagram you want to remove lines from. Then click OK.

Borders in tables and templates

If you convert a range of cells into a table using the Format as Table button on the Home tab, Excel automatically applies borders and formatting. You can change the table style by clicking the table and choosing a different design from the Table Design tab that appears.

Many Excel templates come with borders already built in. If you are starting from a blank sheet and want a professional look quickly, using a template or converting to a table is often faster than adding borders manually to every cell.

Printing with borders

Borders you add to cells print by default, so what you see on screen is usually what you will get on paper. Before printing, go to File and click Print Preview to see how your borders will look. If they do not appear the way you want, close the preview, adjust your borders, and check again.

If your borders look too faint or too bold on the preview, you can change the line thickness by right-clicking the cells, choosing Format Cells, going to the Border tab, and picking a thicker or thinner line style from the Line dropdown.

Frequently Asked Questions

Can I add a border to just one side of a cell?

Yes. Right-click the cell, choose Format Cells, click the Border tab, and click on the sides of the diagram where you want lines. You can add a line to the top only, bottom only, left and right, or any combination. Click OK when done.

Why do my borders not show up when I print?

Borders print by default, but if your printer is set to draft mode or economical printing, they may not appear. Check your printer settings and switch to normal or high-quality mode. You can also preview your print by going to File and clicking Print Preview before sending to the printer.

How do I add a border to the entire sheet?

Select all cells by clicking the box in the top-left corner where the row numbers and column letters meet, then explore borders the same way you would to any range. This is rarely necessary — usually you only border the cells that contain data or form a table.

Can I use borders to separate sections of a spreadsheet?

Yes. Add thicker or colored borders around different sections to make them visually distinct. For example, you might put a thick border around a summary section at the bottom of your data, or use a colored border to highlight important rows or columns.

What is the difference between a border and a line drawing tool?

Borders are applied to cells and move with them if you insert or delete rows and columns. Line drawing tools create shapes that sit on top of the spreadsheet and do not move with cell changes. For organizing data, borders are almost always the right choice.