To add lines between cells in Excel without choosing an outside border, select the range, open Home > Font > Borders, and choose Inside Borders if it appears. If it is not in the menu, choose More Borders, select the Border tab, click Inside under Presets, and select OK. This guide explains how to apply, customize, and troubleshoot the result in Excel for Microsoft 365 on Windows.
What You’ll Need
- An Excel workbook with a range of cells you want to divide visually. The range can contain data, blank cells, or both.
- Permission to edit the worksheet. If the sheet is protected, you may need the password or permission to change formatting.
Inside borders draw lines along the edges shared by cells within the selected range. They are useful for separating rows or columns in a plain worksheet. They do not mean the same thing as All Borders, which also outlines the outside of the selection. You can apply inside borders to a range that is one row tall or one column wide, but a single cell has no shared edges with other selected cells, so it has no inside line to show.
Step-by-Step
- Select the cells to format. Click the first cell and drag across the range, or click the first cell, hold Shift, and click the last cell. You can also click the first cell and use Ctrl+Shift+arrow key to extend the selection to the edge of a contiguous block of data. Check the highlighted range before applying a border; Excel formats every selected cell, including blank cells within the selection.
- Open the Borders menu. Go to the Home tab. In the Font group, find the Borders button, shown as a small square grid. Click the arrow next to the button, not just the button itself. Clicking the main button may repeat the last-used border command rather than open the list.
- Choose the inside-border command. If the menu shows Inside Borders, click it. In some ribbon layouts, that command is not in the first part of the menu. Choose More Borders to open the Format Cells dialog instead. On the Border tab, locate the Presets area and click Inside, then click OK. The dialog is a dependable route when the ribbon menu does not show the option directly.
- Check where the lines appear. Look for lines between the cells in the selected range. For example, selecting B2:D5 and applying inside borders should create vertical dividers between columns B, C, and D, and horizontal dividers between rows 2, 3, 4, and 5. The outside edge of B2:D5 is not the purpose of the Inside preset. If you also want a frame around the range, open the Borders menu again and choose Outside Borders.
- Set a line style or color first, if needed. Open the Borders menu and choose a Line Style or Line Color before applying the border. Then choose Inside Borders, or use More Borders and select Inside in the Border tab. In the dialog, you can also choose a style and color, then click the inside edge indicators in the preview to control which internal lines are used. Finish with OK. A thin neutral line is usually easiest to read in a dense worksheet.
- Apply the border to another range when required. Select the next range and repeat the steps. Excel may retain the last-selected line style and color, so check the preview or menu before applying it. To format separate ranges that are not next to each other, hold Ctrl while selecting additional ranges on Windows, then apply the border. For a more predictable result, format each range separately, especially if they need different border patterns.
- Save and review the worksheet. Press Ctrl+S on Windows. If the worksheet will be printed or shared, check it in Print Preview or export a PDF to confirm that the lines are visible at the intended scale. On a Mac, use Command+S to save. The ribbon and Format Cells dialog are also available in Excel for Mac, though their layout and keyboard shortcuts can differ slightly.
In Excel for the web, select the cells and use the Borders control on the Home tab. Available border choices can vary with the web interface. If you cannot find an Inside option there, use a desktop version of Excel and the More Borders route described above. The desktop steps in this guide refer to Excel for Microsoft 365 on Windows.
Common Mistakes
- Choosing All Borders when you only want interior lines. All Borders draws the internal dividers and the outside perimeter. Use Inside Borders for internal dividers alone; add Outside Borders separately if you need both.
- Selecting just one cell. A single cell has no edges shared with other selected cells. Select at least two adjacent cells to create an inside border. One row of cells produces vertical dividers; one column of cells produces horizontal dividers.
- Clicking the Borders button instead of its arrow. The main button can repeat the most recently used border. Open the dropdown arrow to choose a different command or reach More Borders.
- Formatting a larger area than intended. A border is applied to the whole selection, including empty cells. If the selection accidentally includes extra rows or columns, undo immediately with Ctrl+Z on Windows or Command+Z on Mac, select the correct range, and try again.
- Expecting borders to behave like gridlines. Worksheet gridlines are display guides and usually do not print. Borders are cell formatting and are generally included in printouts. Hiding gridlines does not remove borders, and showing gridlines does not create borders.
- Using a line that blends into the background. A white or very light border can be hard to see on a white worksheet. Choose a darker line color and confirm the result at normal zoom or in Print Preview.
Tips
Use inside borders to make a small data block easier to scan, such as a weekly schedule, a comparison grid, or a list of measurements. They work best when the lines support the structure rather than compete with the content. For example, a thin gray line between rows can help readers track across a wide table, while a darker outside border can make the block’s limits clear.
For a clean table, consider applying Inside Borders first and Outside Borders second. This creates internal divisions plus a visible frame. If you want only horizontal separators, use the Border tab in Format Cells and click the internal horizontal line in the preview rather than applying all inside edges. To create only vertical separators, click the internal vertical line instead. The preview is especially useful when the range has several rows and columns and you want a specific combination.
You can remove border formatting by selecting the affected range, opening Home > Font > Borders, and choosing No Border. That removes borders from the selected cells, including any outside edge you may have added. If you only need to change one edge, use More Borders and adjust the preview instead of clearing every border and rebuilding the format.
When formatting a range that already has borders, inspect the result after applying the Inside preset. If the existing outside frame matters, reapply Outside Borders as a separate step. If cells are part of an Excel table, the table’s style may already provide banding or separators. You can still add borders, but the table style and manual formatting may make the result look heavier than expected.
Troubleshooting
- No lines appear: Confirm that at least two adjacent cells are selected and that you chose an inside-border command rather than No Border. Open More Borders and check that the preview shows internal lines before clicking OK. Also verify that the line color is not white or too faint against the cell fill.
- The outside edge is missing: This is expected if you applied only Inside Borders. Select the same range, open the Borders menu, and choose Outside Borders to add a frame without replacing the internal dividers.
- Only some lines appear: In More Borders, inspect the preview for internal horizontal and vertical edges. Your selected range may be only one row or one column, or the preview may have only one direction selected. Choose the required internal edges and confirm the range is correct.
- The border is on the wrong cells: Undo with Ctrl+Z (Windows) or Command+Z (Mac), then select the intended range carefully. Check for accidental extra selected cells before applying the border again.
- You cannot edit the border: The worksheet may be protected, or the workbook may be opened with read-only permissions. Check Review > Unprotect Sheet if you are authorized to unprotect it, or ask the workbook owner for edit access. Do not remove protection without permission.
- The lines look different when printed: Open Print Preview and check the selected print area, scaling, and page breaks. A very thin line can look faint when a worksheet is reduced to fit a page. Choose a slightly heavier style if needed, and make sure the print area includes the formatted range.
Frequently Asked Questions
What does Inside Borders do in Excel?
It adds borders along the shared edges between cells in a selected range. It is meant to divide the selected area internally, not to draw its outside frame.
What is the difference between Inside Borders and All Borders?
Inside Borders applies internal dividers. All Borders applies those dividers and borders around the outside edge of the selected range.
Can I apply inside borders to only one row or one column?
Yes. For a selected row of two or more cells, inside borders appear between the columns. For a selected column of two or more cells, they appear between the rows.
Can I make only horizontal inside borders?
Yes. Select the range, open More Borders, and use the preview on the Border tab to select the internal horizontal edges without selecting internal vertical edges. Click OK to apply.
Will Excel print inside borders?
Cell borders generally print, unlike worksheet gridlines, which are usually only guides on screen. Check Print Preview because page scaling and thin line styles can affect how clearly borders show on paper.
How do I remove inside borders without clearing other formatting?
Select the cells, open More Borders, and use the Border tab to turn off the internal edges in the preview. Avoid choosing No Border if you need to preserve an outside frame or other border edges.
Related
- How to Sum a Column in Excel With a Shortcut
- Subtract Dates in Excel to Get Months
- Subtract Dates in Excel to Get Days Between Dates
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Freeze Panes: How to Lock Rows and Columns in PlaceYes. In Excel for Microsoft 365 on Windows, you can freeze rows and columns at the same time:…
- Pull Data Dumps With No Blank Rows in ExcelIf your data dump is in A2:D1000 and column A contains a required record ID, enter =FILTER(A2:D1000,A2:A1000<>""," ")…
- How to Enable the Share Option in Excel for CollaborationTo enable sharing in Microsoft Excel for Microsoft 365 on Windows, save the workbook to OneDrive or SharePoint,…
- Making a Schedule in Excel: A Practical Step-by-Step GuideTo make a schedule in Excel, set up a grid with days or dates across the top and…
- Google Sheets vs Excel: Which Spreadsheet Fits?Google Sheets is usually the better fit for browser-based collaboration and simple shared workflows; Microsoft Excel is generally…
- Insert Image in Excel Cell With Text: A Practical GuideIn Excel for Microsoft 365 on Windows, select a cell and choose Insert > Pictures > Place in…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.