How to Put a Black Border Around Excel Cells
In this article
To put a black border around cells in Excel, select the cells, open the Home tab, click the Borders dropdown in the Font group, and choose Outside Borders (or All Borders for grid lines). If you need a custom look, use More Borders to set line style and color to black, then click the preset that matches your range. The steps below cover Windows, Mac, and Excel for the web, which share the same core commands with minor label differences.
What You'll Need
- Excel for Windows, Mac, or Excel for the web (the ribbon layout is nearly identical across versions; labels may vary slightly by version, device, or region).
- A workbook with data or a blank range you want to format.
- Optional: a mouse or trackpad for precise border selection, though keyboard shortcuts work too.
Step-by-Step
- Open your workbook and click the first cell of the range you want to border. Drag to select the full range, or hold Shift and click the last cell. To border the entire sheet, click the Select All button at the top-left corner of the grid (the small square above row 1 and left of column A).
- Go to the Home tab on the ribbon. In the Font group, locate the Borders button (it looks like a small windowpane). Click the arrow next to it to open the border menu.
- Choose a preset. Outside Borders puts a black line around the perimeter of your selection. All Borders draws lines between every cell and around the outside. Thick Box Border gives a heavier outline. For a simple black frame, Outside Borders is usually what you want.
- If the preset does not give the exact look you need, click More Borders at the bottom of the menu. In the Format Cells dialog, go to the Border tab. Under Line, pick a Style (Solid, Dashed, etc.) and set Color to black (the default is often Automatic, which prints black). Then click the diagram buttons for Outline, Inside, or individual edges. Click OK to apply.
- To apply the same border to other cells, use the Format Painter: select a bordered cell, click Format Painter on the Home tab, then drag over the target range. Press Esc when done.
- For a keyboard-only approach, select the range and press Ctrl+Shift+& (ampersand) on Windows to apply an outline border; on Mac, use Command+Option+0 (zero) for a thick box border or Command+Option+Left Arrow for a standard outline. These shortcuts use the current border color, which defaults to black.
- If you want borders to appear automatically as you type, convert the range to a table: select the cells, press Ctrl+T (Windows) or Command+T (Mac), confirm the range, and the table style adds borders. You can then adjust the style from Table Design.
- To remove borders, select the cells, open the Borders menu, and choose No Border. This clears all border lines but leaves fill colors and text intact.
Common Mistakes
- Applying borders to only one cell when you meant the whole range. Always select the full range first; Excel applies borders to the selection, not to the active cell alone.
- Confusing gridlines with borders. Gridlines are screen-only guides and do not print by default. Borders are actual formatting that prints and carries into PDFs.
- Using the wrong preset: All Borders draws lines between every cell, which can look busy. Outside Borders gives a clean frame.
- Forgetting that border color follows the Color setting in the Border tab. If you previously set a colored border, new borders may inherit that color until you reset it to Automatic or black.
- Expecting borders to expand automatically when you add rows. Borders are static formatting; insert rows inside the bordered range and reapply, or use a table for dynamic borders.
Tips
- Use Thick Box Border for headers or totals to make them stand out.
- Set the border color to black explicitly in More Borders if you plan to print in grayscale; Automatic usually prints black but can vary by printer driver.
- Copy a formatted cell with Format Painter to keep border styles consistent across sheets.
- For dashboards, apply borders to the outside of a block and use white or no borders inside to reduce visual clutter.
- Keyboard shortcuts are faster for repeated formatting: Ctrl+Shift+& for outline, Ctrl+Shift+_ (underscore) to remove borders on Windows.
Troubleshooting
- Borders do not appear: Check that you selected the correct range and that the border color is not set to white. In the Border tab, set Color to Automatic or black and reapply.
- Borders print but do not show on screen: Go to View and ensure Gridlines is checked; borders should always show, but a white border color can make them invisible on a white background.
- Borders disappear after sorting or inserting rows: Reapply borders to the new range, or convert the range to a table (Ctrl+T) so formatting extends automatically.
- Shortcut does not work: Laptop keyboards may require Fn or a different key combination. Use the ribbon menu instead.
- Excel for the web limitations: The web version supports basic borders via Home > Borders, but advanced options like diagonal borders or custom line styles may be limited. Use the desktop app for full control.
Frequently Asked Questions
How do I put a black border around multiple non-adjacent cells?
Select the first range, hold Ctrl (Windows) or Command (Mac), select additional ranges, then apply Outside Borders. Excel treats the selection as separate areas and borders each one individually.
Can I make the default border black instead of automatic?
Yes. In the Border tab of Format Cells, set Color to black before choosing your border style. Excel will use that color for subsequent borders until you change it.
Why do my borders look gray instead of black?
Gridlines are gray and do not print. If you see gray lines, you may be looking at gridlines rather than applied borders. Apply a border preset and check in Print Preview.
Do borders carry over when I copy cells to another workbook?
Yes, standard cell borders copy with the cell formatting. If you use Paste Special, choose Formats to bring borders along.
How do I remove all borders at once?
Select the range, open the Borders menu, and click No Border. This clears every border line in the selection.
Can I save a border style for reuse?
Excel does not have a direct border style saver, but you can create a cell style: on the Home tab, open Cell Styles, choose New Cell Style, and include Border in the style definition. Apply it to other cells later.