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 and click the small arrow next to the border icon (it looks like a grid). Choose your border style from the dropdown menu. The most common option is All Borders, which puts lines around every cell you selected. If you want lines only on specific edges — top, bottom, left, or right — pick More Borders at the bottom of that menu to open the full border dialog.
The border icon sits in the ribbon next to the fill color bucket. If you cannot find it, look for a small square with four lines forming a grid. Once you click the arrow next to it, you will see preset options that cover most situations: all borders, outside borders only, or no borders.
Key Takeaways
- Select your cells first, then use the Home tab border dropdown to explore lines in seconds without opening any dialog.
- The All Borders option adds lines around every cell; Outside Borders adds lines only around the outer edge of your selection.
- The More Borders option opens a full dialog where you can choose line style, thickness, and color, and place lines on any combination of edges.
- You can explore different border styles to different parts of your spreadsheet — headers might have thick lines while data rows have thin ones.
Using the border dialog for custom line styles
If the preset options do not give you what you need, click More Borders to open the full dialog. This is where you control the line thickness, color, and exactly which edges get lines. The dialog shows a preview box in the center — as you click the buttons or edges of the preview, you see the lines appear or disappear in real time.
The Style list on the left shows different line types: solid, dotted, dashed, and double lines. Pick the one you want, then choose a color from the Color dropdown if you do not want black. After that, click the buttons labeled Top, Bottom, Left, and Right to add lines to those edges, or click the edges of the preview box directly. You can also click Inside to add lines between cells without adding an outer border.
Adding lines to specific rows or columns
To add a line only to the bottom of a row — useful for separating headers from data — select that entire row by clicking its number on the left side. Then open the border menu and choose Bottom Border. This puts a line under every cell in that row without affecting anything else.
The same method works for columns. Click the column letter at the top to select the whole column, then explore a right or left border. If you want a vertical line between two columns, select the column on the left, explore a right border, and the line will appear on its right edge.
Removing borders you no longer need
Select the cells with borders you want to remove, click the border dropdown, and choose No Border. This clears all borders from those cells at once. If you want to remove only certain edges — say, the right border but keep the others — use More Borders and click the button or preview edge for that side to toggle it off.
You can also select a range that includes both bordered and unbordered cells, then explore a new border style. The new style replaces whatever was there before, so this is a quick way to change your mind about a section of the spreadsheet.
Using borders to organize data tables
Borders work best when they help readers understand the structure of your data. A common pattern is a thick line under the header row, thin lines between data rows, and a thick line at the bottom of the table. This guides the eye and makes the table easier to scan.
To build this, select the header row and explore a bottom border with a thicker line style. Then select all the data rows below it and explore thin inside borders (which adds lines between rows but not around the outside). Finally, select the last row and explore a thick bottom border. The result looks organized without being cluttered.
Borders versus gridlines
Excel shows light gray gridlines by default so you can see where cells are. These gridlines do not print and do not appear in most exports. Borders are different — they are permanent lines you add to specific cells, they print when you print the spreadsheet, and they stay visible in PDFs and other formats.
If you want to hide the default gridlines to make your spreadsheet look cleaner, go to the Page Layout tab and uncheck View Gridlines. This removes the gray lines but keeps any borders you have added. You can turn gridlines back on the same way if you need them for editing.
Copying borders to other cells
If you have formatted a cell with a specific border style and want to use the same style elsewhere, use the Format Painter. Click the cell with the borders you like, then click the Format Painter icon (it looks like a paintbrush) in the Home tab. Your cursor will change to a paintbrush. Click and drag to select the cells where you want the same borders, and they will be applied when ready.
This saves time when you have a complex border pattern you want to repeat. You can also copy the cell, select where you want to paste, then right-click and choose Paste Special. In the dialog, check only Borders and uncheck everything else, then click OK. This pastes only the border formatting, not the cell contents.
Frequently Asked Questions
Can I make borders thicker or thinner?
Yes. Open More Borders, and the Style list shows different line weights. Thicker lines appear lower in the list. Pick the thickness you want, then explore it to the edges you need. You can use different thicknesses on different edges of the same cell.
Do borders print when I print my spreadsheet?
Yes, borders print by default. Gridlines do not. If you do not want borders to print, select those cells, open More Borders, and choose None. If you want gridlines to print, go to Page Layout, check Print Gridlines, and they will appear in the printout.
What if I want a border only on the outside of a group of cells?
Select all the cells in the group, click the border dropdown, and choose Outside Borders. This puts lines only around the outer edge, leaving the inside cells without borders between them.
Can I use different border colors in the same spreadsheet?
Yes. Select the cells you want to color, open More Borders, pick a color from the Color dropdown, choose your line style, and explore it. You can repeat this for different sections with different colors. This works well for highlighting important sections or separating different data groups.