Applying borders to cells in Excel helps separate data, define table areas, and make reports easier to read. You can add borders to a single cell, a range, or an entire worksheet using the built-in border tools. This guide covers the quickest methods, customization options, and common pitfalls.
What You’ll Need
- Microsoft Excel (2010 or later, including Microsoft 365)
- A worksheet with cells you want to format
- The cells selected where you want the border to appear
Step-by-Step
- Select the cells you want to border. Click and drag to highlight a range, or click a single cell. To select non-adjacent cells, hold Ctrl (Windows) or Cmd (Mac) while clicking.
- Go to the Home tab on the ribbon. Look for the “Font” group, which contains the border button (it looks like a square divided into four smaller squares).
- Click the border button (the small arrow next to it) to open the border menu. You’ll see options like Bottom Border, Top Border, Left Border, Right Border, All Borders, and Outside Borders.
- Choose a border style from the menu. For a basic table look, select All Borders to put lines around every selected cell. If you only want an outline around the group, choose Outside Borders.
- Apply the border – Excel instantly draws the border on the selected cells. If you want to remove borders later, select the cells and choose No Border from the same menu.
- Customize the border line (optional): In the border menu, click More Borders at the bottom. This opens the Format Cells dialog box with the Border tab active. Here you can pick a line style (solid, dashed, thick), a color, and then click the buttons around the preview to place each side individually.
- Use the Draw Borders tool (optional): For more control, select Draw Border from the border menu. The cursor becomes a pencil. Drag across cells to draw borders exactly where you want them. Press Esc to exit drawing mode. You can also choose Draw Border Grid to draw all internal lines at once.
Common Mistakes
- Applying borders to the wrong range – Always double-check your selection before clicking the border button. It’s easy to include an extra column or miss a row.
- Using All Borders when you only need an outline – If you want a box around a table but not lines between every row, use Outside Borders instead of All Borders.
- Borders not showing when printing – Borders are part of the cell formatting, but if you don’t set the print area correctly, you might not see them on paper. Check Print Preview before printing.
- Overwriting existing borders – When you apply a new border style, it replaces the previous one on the selected cells. If you want to keep some lines, use the individual side buttons in the Format Cells dialog.
Tips
- Use keyboard shortcuts: Select the cells, then press Ctrl+Shift+& to apply an outline border, or Ctrl+Shift+_ to remove all borders. On Mac, use Cmd instead of Ctrl.
- Create a custom border style: In the Format Cells dialog, you can set a default style and color for all future borders by choosing them and then clicking OK. This is handy if you consistently use a specific line weight.
- Copy formatting with Format Painter: If you have a cell with the perfect border, select it, click the Format Painter icon (a paintbrush) in the Clipboard group, then click the target cells to copy the border (and other formatting).
- Use Table Styles for automatic borders: If you’re creating a data table, consider using Format as Table (Home tab > Styles). This applies consistent borders and banding, and the formatting stays correct when you add rows.
- Borders vs. Gridlines: Gridlines are the light gray lines that appear by default on screen; they are not printed. Borders are formatting that prints. If you want to see gridlines on paper, you must add borders or change the sheet print options.
Troubleshooting
- Borders don’t appear on screen: Check that the cell fill color isn’t covering them. A dark fill can hide borders. Also, ensure the zoom level is not too low; at very small zoom, thin borders may not render.
- Borders don’t print: Go to Page Layout > Sheet Options and make sure the “Print” checkbox under Gridlines is unchecked (if you want only borders). Also, check that the print area includes the bordered cells. In Print Preview, verify the borders appear.
- Only some borders show after applying All Borders: This can happen if the cells have conditional formatting that overrides borders. Check the Conditional Formatting rules for the range and adjust them to not conflict.
- Border button is grayed out: You might be in a protected sheet or the workbook is shared. Unprotect the sheet (Review > Unprotect Sheet) or check with the workbook owner.
- Borders disappear when I type in a cell: This is unusual. Make sure you haven’t accidentally applied a style that removes borders when editing. Also, check if the cell has a custom number format that hides borders – but that’s rare. Try reapplying the border after typing.
Frequently Asked Questions
How do I add a border to an entire row or column?
Select the entire row by clicking its number, or the entire column by clicking its letter, then apply the border as usual. The border will apply to all cells in that row/column that are within the used range.
Can I save a custom border style for future use?
Yes. Create the border in a cell, then right-click that cell and choose Copy. Then right-click the destination cell, choose Paste Special > Formats. Alternatively, use Format Painter to copy the border to other cells.
Why do my borders disappear when I sort or filter data?
Sorting and filtering can rearrange cells, and if the border is applied to a range that moves, it may not follow. To keep borders with data, apply borders to the entire data range before sorting, or use a Table (Insert > Table) which maintains formatting.
How do I remove only the border from a cell without deleting other formatting?
Select the cell, go to the border menu, and choose No Border. This removes all borders from the selection but keeps font, fill, and other formatting.
Can I apply different border styles to different sides of the same cell?
Yes. Open More Borders, choose a line style and color, then click the individual side buttons (top, bottom, left, right) in the preview area. Repeat for each side with a different style if needed.
Is there a way to add borders to all cells in a worksheet at once?
Select all cells by clicking the triangle at the intersection of the row numbers and column letters (or press Ctrl+A twice), then apply All Borders. Be aware this will border every cell, even empty ones, which may look cluttered.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Google Photos Backup Stuck? Fixes That Work
- Record Your Own Alarm Sound on Android
- Transfer Music from ZTE to iPhone: Full Guide
- Angel Investor vs Venture Capitalist: Key Differences
- Sync Apps Between Android Devices Using Google Play
- Find What Drains Your iPhone Battery Fast