How to Show Lines in Excel: Gridlines and Borders Guide
In this article
To show lines in Excel, you can either enable the default gridlines via the View tab or apply custom borders to specific cells using the Home tab. Gridlines are the light gray lines that help you navigate the sheet but do not print by default, while borders are solid lines you define that remain visible during printing and PDF exports.
What You'll Need
- A computer with Microsoft Excel installed (Windows or macOS).
- An open workbook or a new blank spreadsheet.
- Basic mouse or trackpad navigation skills.
Step-by-Step
Depending on whether you want the general layout lines (gridlines) or permanent structural lines (borders), follow the appropriate method below. Note that menu labels may differ slightly depending on your version of Excel or your region.
Method 1: Showing Default Gridlines
Gridlines are the faint lines that separate every cell in a worksheet. If these have disappeared, it is usually because a setting was toggled off or a white fill color was applied to the cells.
- Open your Excel workbook and navigate to the specific worksheet where the lines are missing.
- Click on the View tab located in the top ribbon menu.
- Locate the Show group within the ribbon.
- Find the checkbox labeled Gridlines. If it is unchecked, click the box to enable it. The light gray lines should immediately reappear across the entire sheet.
- If you want these gridlines to appear when you print the document, go to the Page Layout tab. In the Sheet Options group, under the Gridlines section, check the box for Print.
Method 2: Adding Custom Borders
Borders are used to highlight headers, separate data categories, or create a professional table look. Unlike gridlines, borders are permanent and customizable in color and thickness.
- Select the range of cells where you want the lines to appear. You can click and drag your mouse to highlight a block of cells, or press Ctrl + A to select the entire used area.
- Click on the Home tab in the ribbon.
- In the Font group, look for the Borders icon (it looks like a small square grid).
- Click the drop-down arrow next to the Borders icon to see a list of options.
- Choose the specific type of line you need:
- All Borders: Applies a solid line to every side of every cell in the selection.
- Outside Borders: Places a line only around the perimeter of the selected range.
- Thick Outside Border: Creates a bold frame around the selection, useful for outlining a main table.
- Bottom Border: Adds a line only to the bottom of the cells, ideal for totaling rows.
- To change the line style (such as dotted or double lines) or the color, select Line Style or Line Color from the bottom of that same drop-down menu, then re-apply the border to the cells.
Method 3: Using the Format Cells Dialog
For more precise control over which specific lines are shown, the Format Cells menu is the most powerful tool.
- Highlight the cells you wish to modify.
- Right-click anywhere within the selected area and choose Format Cells... from the context menu.
- In the window that opens, click on the Border tab.
- In the Style box, select the thickness and type of line you want.
- In the Color box, choose the desired line color.
- In the Border preview area, click the buttons or the diagram to place lines exactly where you want them (e.g., only the left and right sides, or only the internal horizontal lines).
- Click OK to apply the changes.
Common Mistakes
One of the most frequent errors users make is confusing gridlines with borders. Gridlines are a visual aid for the user on the screen; borders are actual formatting applied to the cell. If you spend time enabling gridlines in the View tab but find they are still missing when you print the document, it is because you did not enable the "Print Gridlines" option in the Page Layout tab, or you did not use Borders.
Another common mistake is applying a white fill color to cells. In Excel, if you use the Fill Color tool (the paint bucket icon) and select white, it covers the default gridlines. Many users think their gridlines have been turned off in the settings, when in reality, they have simply "painted" over them with white. To fix this, select the cells and change the fill color back to No Fill.
Users also often over-border their spreadsheets. Adding "All Borders" to a massive dataset can make the sheet look cluttered and difficult to read. Professional spreadsheets typically use a combination of a thick outside border for the table and thin horizontal lines for rows, avoiding vertical lines unless absolutely necessary for clarity.
Tips
To speed up your workflow, use keyboard shortcuts for borders. While the ribbon is intuitive, pressing Ctrl + Shift + & will quickly apply an outside border to a selected range. To remove all borders from a selection, press Ctrl + Shift + _ (underscore).
For a cleaner, modern look, try using Format as Table. Instead of manually adding lines, select your data and go to Home > Format as Table. This allows you to choose a pre-designed style that handles the lines (banding) automatically. Banded rows (where every other row has a light fill color) often eliminate the need for horizontal lines entirely, making the data much easier to track across a wide screen.
If you are working with a very large sheet, use the Freeze Panes feature (View > Freeze Panes) in conjunction with borders. By placing a thick bottom border on your header row and freezing it, the "line" remains visible as a boundary even as you scroll down through thousands of rows of data.
Troubleshooting
If you have followed the steps to show lines but they are still not appearing, try these checks in order:
- Check Fill Color: Select the cells and go to Home > Fill Color. Ensure it is set to "No Fill." A white background hides gridlines.
- Check Gridline Toggle: Go to the View tab and ensure the "Gridlines" checkbox is checked.
- Check Conditional Formatting: Sometimes, conditional formatting rules are set to remove borders or change cell colors based on a value. Go to Home > Conditional Formatting > Clear Rules > Clear Rules from Selected Cells to see if the lines reappear.
- Check for Overlapping Objects: Ensure there isn't a large white shape or text box floating over your cells, which would block the view of the grid.
- Verify Print Settings: If lines show on screen but not on paper, go to Page Layout and check the "Print" box under Gridlines, or switch to using Borders.
Frequently Asked Questions
Why are my gridlines missing in only one sheet?
Gridline settings are specific to each individual worksheet within a workbook. You must go to the View tab and enable Gridlines for each sheet where they are missing.
How do I remove all lines from my spreadsheet?
To remove gridlines, uncheck the Gridlines box in the View tab. To remove borders, select the cells, click the Borders drop-down on the Home tab, and select "No Border."
Can I change the color of the default gridlines?
Yes, though it is a deeper setting. Go to File > Options > Advanced. Scroll down to the "Display options for this worksheet" section and change the Gridline color from the dropdown menu.
What is the difference between a border and a gridline?
Gridlines are non-printing guides that show the boundaries of all cells by default. Borders are custom lines applied by the user that are visible both on screen and when printed.
How do I make a line thicker in Excel?
Select your cells, right-click, choose Format Cells, go to the Border tab, and select a thicker line style from the Style list before clicking the border locations you want to apply it to.