Adding normal border lines in Excel is one of the quickest ways to make a spreadsheet look organized and professional. You can add borders to a single cell, a range of cells, or an entire table in just a few clicks using the Borders button on the Home tab. Here’s the direct method: select the cells, go to Home > Borders (the pencil icon next to the gridlines button), and choose All Borders. That’s it—your selected cells now have thin lines around each one. Below, I’ll walk through every method, including keyboard shortcuts, the Format Cells dialog box, and how to remove or customize borders.
What You’ll Need
- Microsoft Excel (desktop version for Windows or Mac, or Excel for the web)
- A worksheet with data already entered, or a blank sheet you want to format
- No special add-ins or plugins required—borders are built into Excel
Step-by-Step
- Select the cells where you want borders. Click and drag to select a range, or click a single cell. To select an entire table, click any cell inside it and press Ctrl+A (Windows) or Cmd+A (Mac) twice if needed.
- Go to the Home tab on the ribbon. Look for the Font group—the Borders button is the small square with four lines, usually next to the fill color bucket.
- Click the Borders dropdown arrow (not the button itself, unless you want the last-used border style). A menu appears with options like Bottom Border, Top Border, Left Border, Right Border, All Borders, Outside Borders, Thick Box Border, and more.
- Choose “All Borders” from that dropdown. This applies a thin black line around every cell in your selection. If you only want a border around the outside of the selection (not between cells), choose Outside Borders instead.
- Check the result—your cells now show gridlines-like borders. If you don’t see them, make sure the cells aren’t filled with a solid color that hides the lines, or that the border color isn’t white.
- For more control, use the Format Cells dialog: select your cells, press Ctrl+1 (Windows) or Cmd+1 (Mac), then go to the Border tab. Here you can choose line style (solid, dashed, thick), color, and which sides to apply. Click Outline for the outer border, Inside for internal lines, or click directly on the preview diagram to toggle individual borders.
- To apply borders to an entire table automatically, select the data range, then go to Home > Format as Table and pick a style. Table styles include borders by default, and they stay consistent when you add rows.
- To remove borders: select the cells, go to Home > Borders > No Border. Or use the Format Cells dialog and click None on the Border tab.
- Keyboard shortcut for All Borders: select cells, press Alt+H, B, A (Windows). On Mac, there’s no direct shortcut—use the ribbon or Format Cells.
Common Mistakes
- Applying borders to the wrong range—always double-check your selection before adding borders. It’s easy to select an extra column or miss a row.
- Using “Outside Borders” when you meant “All Borders”—if your goal is lines between every cell, you must choose All Borders, not just the outer box.
- Borders not printing—borders are screen-only by default unless you set the print area correctly. Go to Page Layout > Print Area > Set Print Area and check Print Gridlines if you want the faint gridlines too.
- Borders disappear when you copy/paste—if you copy cells with borders and paste them elsewhere, the borders may not come along if you use “Paste Values”. Use Paste Special > All or just paste normally to keep formatting.
- Using a thick border for everything—thick borders can make a spreadsheet look cluttered. Reserve thick lines for totals or section breaks.
Tips
- Use the Borders dropdown’s “Draw Border” tools for precise control. Select Draw Border from the bottom of the dropdown, then drag over cells to add borders one by one. Draw Border Grid adds lines inside a range as you drag.
- Set a default border style by going to File > Options > Advanced (Windows) and scrolling to “Display options for this worksheet”—but that only affects gridlines, not borders. For a reusable border style, create a custom cell style: go to Home > Cell Styles > New Cell Style, then set a border.
- Use keyboard shortcuts for speed: after selecting cells, press Ctrl+Shift+& (Windows) to apply All Borders instantly. On Mac, it’s Cmd+Option+0 (zero).
- Borders are part of cell formatting—they follow the cell when you move or copy it, unless you specifically paste values only.
- For a clean report look, use thin solid borders for data, a medium border for totals, and no borders at all for empty spacer rows.
Troubleshooting
- Borders not showing on screen? Check that the cell fill color isn’t the same as the border color. Also, if you’ve applied a white border, it will be invisible on a white background. Go to Home > Borders > Line Color and pick black or another dark color.
- Borders print incorrectly or not at all? Open Page Layout > Print Titles and ensure the print area includes your bordered cells. Also, under Sheet Options, check “Print” under Gridlines if you want the faint gridlines, but borders should print regardless. If they don’t, try setting the print area again or check your printer’s “background graphics” setting.
- Borders appear only on some cells? You might have applied borders to a range that overlaps with merged cells. Merged cells can behave oddly—unmerge them (Home > Merge & Center to toggle off) and reapply borders.
- Borders disappear after sorting or filtering? Sorting moves cell content but should keep formatting, but filtering hides rows—borders remain on hidden rows. If you copy filtered data, only visible cells are copied, so borders may be missing in the paste. Use Go To Special > Visible Cells Only before copying if needed.
- Can’t find the Borders button? If your ribbon is collapsed, click the small arrow at the bottom-right of the Font group to expand the full Font dialog, or double-click any ribbon tab to expand it.
Frequently Asked Questions
- How do I add a border to only the outside of a range? Select the range, go to Home > Borders > Outside Borders. That puts a box around the selection with no internal lines.
- Can I add a colored border? Yes. In the Borders dropdown, choose Line Color first, pick a color, then apply a border style. Or use the Format Cells dialog (Ctrl+1) and select a color under the Border tab.
- Why do my borders not print even though they show on screen? Usually because the print area doesn’t include those cells, or the printer is set to “Draft” mode which may skip graphics. Set the print area again and check printer settings.
- How do I remove all borders from a worksheet quickly? Select all cells by clicking the triangle at the top-left corner (or press Ctrl+A twice), then go to Home > Borders > No Border.
- Is there a way to apply borders to every cell that has data? Yes. Select the data range (or press Ctrl+A to select all), then use Home > Borders > All Borders. For a dynamic range, use a Table (Ctrl+T) and the borders will extend as you add rows.
- Do borders affect formulas or calculations? No, borders are purely visual formatting. They don’t change values, formulas, or cell references.
Related
- How to Add Enter in Excel Cell (New Line)
- WFH Data Entry Part Time: Realistic Guide
- How to Add More Rows in Excel (Fast & Easy)
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Google Sheets Checkbox X Symbol: Show an X InsteadGoogle Sheets’ built-in checkbox cannot be changed to draw an X instead of its usual check mark. To…
- Excel: Where Is the Data for Your Table?In Excel, the data for a table is the range of worksheet cells containing the records and column…
- Snowflake SPLIT_PART: Syntax, Examples, and Edge CasesSnowflake’s SPLIT_PART function returns one piece of a string separated by a specified delimiter. Its syntax is SPLIT_PART(string,…
- Excel Freeze Panes: Change Them While Scrolling?No—Excel does not change the Freeze Panes boundary automatically as you scroll. To move it, unfreeze the current…
- Enum valueOf in Java: How It WorksThe Enum.valueOf() method in Java returns the enum constant of a specified enum type that matches a given…
- Excel Split Cells: Did Microsoft Remove the Feature?No—Excel did not get rid of a command that splits one cell into smaller cells; Excel has never…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.