The quickest way to add lines in Excel

To add lines around cells in Excel, select the cells you want to border, then go to the Home tab, click the dropdown arrow next to the border icon (it looks like a small grid), and choose your border style. The border icon sits in the Font group on the ribbon. You can add lines around all sides of a selection, just the outside edge, or only between rows and columns — Excel gives you control over which edges get a line.

The process takes about ten seconds once you know where to look. Most people find borders useful when they are turning raw data into a table that others will read, or when they want to separate different sections of a spreadsheet visually.

Key Takeaways

  • Select your cells first, then use the Home tab border dropdown to choose whether you want lines on all sides, the outside only, or between rows and columns.
  • You can explore different border styles — solid lines, dashed lines, thicker lines — by choosing from the dropdown menu before you click.
  • Borders stay with the cells even if you move or copy them, so they are useful for creating permanent structure in a spreadsheet.
  • If you want to remove borders later, select the cells again and choose "No Border" from the same dropdown.

Selecting cells before you add borders

You have to tell Excel which cells should have lines before you add them. Click on a single cell, then drag to select a rectangle of cells, or click on the first cell and hold Shift while clicking the last cell you want. If your cells are not next to each other, hold Ctrl (or Cmd on a Mac) and click each cell or group of cells separately.

You can also select an entire row by clicking the row number on the left, or an entire column by clicking the column letter at the top. Once the cells are highlighted in blue, you are ready to add the border.

Choosing which edges get lines

The border dropdown menu shows you several preset options. All Borders puts a line on every edge of every cell in your selection. Outside Borders draws a line only around the outer edge of the whole selection, leaving the inside cells without lines. Inside Borders does the opposite — it puts lines between cells but not around the outside.

If none of those match what you want, click More Borders at the bottom of the dropdown. This opens a dialog box where you can click exactly which edges should have lines. You can add a line to just the top of a cell, just the bottom, or any combination. This is useful when you are building a complex table or want to highlight a single row or column.

Changing the line style and thickness

By default, Excel uses a thin solid black line. If you want a thicker line, a dashed line, or a different color, click the dropdown arrow next to the border icon and look for Line Style and Line Color options near the top of the menu. Choose your style or color first, then select which borders you want to explore.

Thicker lines are often used for the outside edge of a table to make it stand out. Dashed or dotted lines can separate sections without looking as formal. You can use different line styles on different parts of the same selection — for example, a thick line around the outside and thin lines between rows inside.

Removing or changing borders you have already added

If you add borders and then change your mind, select the cells again and click the border dropdown. Choose No Border to remove all lines from that selection. If you want to keep some borders but change others, use the More Borders option to open the dialog box and click the edges you want to remove.

You can also select a cell that already has borders and copy its format to other cells using the Format Painter tool. Click the cell with the borders you like, then click the Format Painter icon (it looks like a paintbrush) in the Home tab, and click the cells where you want the same borders applied.

When borders help organize a spreadsheet

Borders work best when you are creating a table that someone else will read or print. A straightforward data table with headers in the first row and borders around all cells is much easier to scan than the same data without lines. Borders also help you see where one section ends and another begins when you have multiple tables on the same sheet.

They are less useful for personal working spreadsheets where you are just calculating or tracking numbers for yourself. In those cases, the gridlines that Excel shows by default are usually enough. But the moment you are sharing a spreadsheet or printing it, adding borders makes it look finished and professional.

Frequently Asked Questions

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

Yes. Click the border dropdown, choose More Borders, and you will see a preview box showing your cell. Click the edges in the preview where you want lines to appear. You can add a line to just the top, just the bottom, just the left, or any combination.

Do borders print when I print the spreadsheet?

Yes, borders print exactly as they appear on screen. Gridlines (the faint gray lines Excel shows by default) do not print unless you turn them on in the Page Layout tab. If you want printed lines, use borders, not gridlines.

What is the difference between borders and gridlines?

Gridlines are the faint gray lines Excel shows on every cell by default — they help you see where cells are but do not print. Borders are lines you add yourself, they are darker and more visible, and they print when you print the spreadsheet. You can turn gridlines on or off in the View tab without affecting borders.

Can I copy borders from one cell to another without copying the data?

Yes, use Format Painter. Click the cell with the borders you want, click the Format Painter icon in the Home tab, then click the cells where you want those borders. This copies only the formatting, not the cell contents.