How to Put Borders in Excel Cells: Clear Steps and Tips

How-to basics · Updated November 20, 2026

To put a border in an Excel cell, select the cell, open Home > Borders in the Font group, and choose a border style such as Outside Borders or All Borders. A border creates a visible line around a cell or range, helping headings, totals, and table sections stand out; it is separate from Excel’s faint worksheet gridlines. These steps are for Microsoft Excel for Microsoft 365 on Windows.

What You’ll Need

  • An Excel workbook that you can edit.
  • The cell or range you want to format. If you are working with a range, decide whether you want a line around its outside edge, lines between every cell, or both.

Step-by-Step

  1. Select the cell or range. Click a single cell to frame it, or drag across adjacent cells to select a range. To select separate, non-adjacent cells, hold Ctrl while clicking each cell on Windows. Applying a border to a range can create edges around the whole selection, between cells, or both, depending on the option you choose.
  2. Open the Borders menu. Go to the Home tab and find the Font group. Click the small arrow beside the Borders icon, which looks like a square divided into sections. Click the arrow rather than the main icon when you want to choose a specific border type. If you click the main icon, Excel applies the currently shown border command, which may not be the one you intended.
  3. Choose a border preset. Pick an option from the menu. Outside Borders draws a frame around the outside of the selected cell or range. All Borders draws an outline around each cell in the selection, including the lines separating cells. Bottom Border adds a line along the bottom edge of each selected cell. Other choices include Top, Left, and Right Border, as well as Thick Outside Borders. The menu may show a preview icon beside each command.
  4. Check what Excel applied. Click an empty cell or another part of the sheet to see the result clearly. For a single cell, Outside Borders usually puts a line on all four sides. For a multi-cell range, Outside Borders frames the selection without adding internal dividing lines; All Borders adds those internal lines too. If the result is wrong, use Undo immediately with Ctrl+Z on Windows, then select the correct command.
  5. Set a custom line style or color if needed. Open the Borders menu again and choose More Borders to open the Format Cells dialog on its Border tab. In the Line section, select a line style and, if desired, a color. Then use the border buttons or the diagram in the Border area to apply the chosen line to the top, bottom, left, or right edge, or to internal lines. Click OK when the preview matches what you want. If you change a line style or color but do not select an edge in the preview, Excel may have no new border to apply.
  6. Apply a border to several cells consistently. Select the complete range first, then choose the border command. For a boxed table with visible cell divisions, use All Borders. For a clean frame around a block of data, use Outside Borders. If only the heading row needs a bottom line, select that row’s cells and choose Bottom Border. Selecting the right range before formatting avoids having to repair individual edges afterward.
  7. Use the keyboard to reach the border options. On Windows, press Alt, then H, then B to open the Borders menu from the ribbon. Use the arrow keys to move through the available choices and press Enter to apply one. You can also press Ctrl+1 to open Format Cells and select the Border tab for detailed settings. Keyboard sequences can depend on ribbon layout or language; if a key does not open the expected menu, use the visible Home tab controls instead.
  8. Save and verify the workbook. Press Ctrl+S on Windows after formatting. If the sheet will be printed or shared as a PDF, check the print preview as well as the worksheet. Cell borders generally print as formatting, while gridlines have separate display and print settings. A border that looks subtle on screen can appear more prominent on paper, especially if you chose a thick line or a dark color.

Common Mistakes

  • Confusing gridlines with borders. Gridlines are the faint guides Excel displays between cells; they are not the same as borders. Turning gridlines off does not remove cell borders, and adding a border does not change the gridline setting. Use borders when you need specific lines to remain visible as deliberate formatting.
  • Choosing All Borders when you only want an outline. All Borders creates lines between the cells in a selected block as well as around its outside. For a single frame around several cells, choose Outside Borders instead. Conversely, Outside Borders will not divide a table into individual cells.
  • Formatting the wrong selection. A border command affects the active selection, not necessarily just the cell where the pointer appears. Before choosing a command, check that the intended cell or range is highlighted. If the result looks incomplete, check whether some cells were left out of the selection.
  • Expecting fill color or font color to change the border. These are separate formatting controls. The Borders menu or the Border tab in Format Cells controls the edge lines; Fill Color changes the cell background, and Font Color changes text.
  • Assuming a border will appear in every view. Borders are cell formatting and normally move with the cells, but their appearance can vary with zoom, screen contrast, print scaling, and selected line color. Check the worksheet at a readable zoom and use print preview if the output matters.

Tips

  • Use the simplest border that conveys the structure. A bottom border can separate a heading from the data below, while a thick outside line can emphasize a total block. Applying heavy lines to every cell can make a busy sheet harder to read.
  • Use a light internal line for dense tables. If All Borders makes a table visually crowded, try a thinner, lighter line through More Borders. Keep the outside edge stronger than internal divisions when you want the table boundary to be easy to scan.
  • Match the border to the purpose. A consistent style helps readers distinguish headings, subtotals, and final totals. Avoid using several unrelated colors or line weights in one small table unless each one has a clear meaning.
  • Reuse formatting carefully. If you want another cell to have the same border and other formatting, use Format Painter on the Home tab. It copies more than borders, including formatting such as fill and font, so check the destination cell afterward. If you only need a border, applying the border command directly is less likely to change unrelated formatting.
  • Remember that borders belong to cell edges. Adjacent cells share a boundary. If you apply different border styles to cells that meet, the visible result can be affected by which edges were formatted. For a uniform table, select the entire block and apply the desired borders in one operation.

Troubleshooting

The border does not appear. Confirm that you selected the cell or range, not a chart, shape, or text box. Check that you chose a border option rather than only changing the line color or style in the Format Cells dialog. If the line is white or very light on a white background, choose a darker color. Zoom in to inspect thin lines, then open More Borders and check the preview before clicking OK.

Lines appear inside the block when you wanted only an outer frame. Select the range again and choose Outside Borders. If internal lines remain, they may be borders already applied to the cells. Open More Borders and use the None option or the preview controls to remove the unwanted internal edges, then apply Outside Borders again. Take care not to clear the outside edge while removing internal lines.

The border seems to disappear when gridlines are hidden. Check whether you applied an actual border. On the View tab, the Gridlines checkbox controls worksheet gridlines, not borders. A deliberate border should remain visible when gridlines are hidden, although a thin or pale border can be difficult to see at some zoom levels.

The printed page does not match the worksheet. Open File > Print and review the preview. Verify that the border itself is visible and that scaling has not made it too faint. If you expected blank cells to show worksheet gridlines in print, look under Page Layout > Sheet Options > Gridlines and enable Print; this setting concerns gridlines, not cell borders. Printing options can vary by printer, so check the preview before printing the full workbook.

The menu or dialog looks different. In Excel for Mac, select the cells and use the Borders control on the Home tab; the menu layout may differ from Windows. Command+1 opens Format Cells on many Mac keyboard layouts, while Ctrl+1 is the Windows shortcut. Excel for the web also has border choices on the Home tab, but detailed formatting controls can differ from the desktop dialog. If a command is not shown, use the available border dropdown or open the workbook in the desktop app for more detailed line settings.

Frequently Asked Questions

How do I put a border around just one Excel cell?
Select the cell, open Home > Borders, and choose Outside Borders. That applies a line around its four edges. Choose More Borders if you want a custom color or line weight.

How do I put borders around multiple cells without lines between them?
Select the range and choose Outside Borders. This frames the selected block without adding internal divider lines. If internal borders were already present, remove those separately using the Border tab in Format Cells.

How do I add lines between every cell in a range?
Select the full range and choose All Borders from the Borders menu. Excel applies a border to the outside edge and to the boundaries between cells in the selection.

Can I change the color or thickness of an Excel border?
Yes. Open Home > Borders > More Borders, choose a color and line style, select the edges in the preview, and click OK. The available line styles and preview may look slightly different across platforms.

Why can I see gridlines but not a border?
Gridlines are worksheet guides, while borders are formatting applied to chosen cell edges. Select the cell and apply a border command. If you already did, check the line color, style, and preview because a pale or very thin line may be hard to see.

Will Excel cell borders print?
Cell borders normally print as part of the cell formatting. Use File > Print to check the preview. The separate option to print gridlines applies to worksheet gridlines, not to borders you added to cells.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.