This is an overview.
Download Practice Workbook
Download the practice workbook.
Method 1 – Show the Gridlines in the Worksheet using the Ribbon
There are no gridlines in this sheet:
To add gridlines:
- Click on the top left corner or press CTRL+A to select all the cells.
- Go to the View tab and select Show.
- Check Gridlines.
This is the output.
Method 2 – Add Gridlines using the Excel Options
- Click File and select Options.
- Select Advanced.
- Check Show gridlines.
- Click OK.
This is the output.
Method 3 – Add Gridlines to a Specific Area in the Worksheet
- Select B4:B12.
- Go to the Home tab and select Border.
- Choose All Borders.
This is the output.
How to Change the Color of Gridlines
- Click File and select Options.
- Select Advanced.
- Choose a color in Gridline color. Here, red.
- Click OK.
This is the output.
Read More: How to Show Gridlines after Using Fill Color in Excel
How to Print Gridlines in Excel
- Go to the Page Layout tab and select Sheet Options.
- Check Print in Gridlines.
- Click Print or press CTRL+ P, you will see the sheet with gridlines.
How to Hide the Gridlines in Excel
1. Hide the Gridlines in the Whole Worksheet using the Ribbon
- Select the entire sheet or press CTRL+A.
- Go to the View tab and select Show.
- Uncheck Gridlines.
This is the output.
2. Make the Gridlines Invisible by Changing the Background Color
- Select the entire sheet and go to the Home tab.
- Select Fill Color.
- Change the background color from No Fill to White.
This is the output.
3. Remove the Gridlines from Specific cells
- Select the cells and right-click.
- Select Format Cells.
- Select Color and choose white.
- Choose Outline and Inside in Presets.
- Click OK.
This is the output.
4. Hide the Gridlines Using an Excel Shortcut
- Press ALT + W+ V + G.
This is the output.
5. Remove the Gridlines Using a VBA Code
- Go to the Developer tab and select Visual Basic.
- In Insert, select Module.
- Use the following code in the module.
- Click Run.
Sub Hide_Mesh()
If ActiveWindow.DisplayGridlines Then
ActiveWindow.DisplayGridlines = False
Else
MsgBox "Grid lines are already hidden!"
End If
End Sub
Code Breakdown
If ActiveWindow.DisplayGridlines Then
ActiveWindow.DisplayGridlines = False
Else
MsgBox "Grid lines are already hidden!"
End If
- The If statement checks the condition ActiveWindow.DisplayGridlines. If it is true, gridlines are currently displayed in the active window and the code block following the If statement is executed. Here, ActiveWindow.DisplayGridlines = False is executed. It sets the DisplayGridlines property of the active window to False: gridlines will be hidden.
- If the condition is false, the code block following the Else statement is executed. Here, it displays a message box with the text “Gridlines are already hidden!”.
This is the output.
6. Hide Gridlines While Printing the Sheet
- Go to the Page Layout tab and select Sheet Options.
- Uncheck Print.
This is the output.
Gridlines are Not Showing in Excel – Solution
Gridlines are not visible because of the fill color:
- Select the entire sheet.
- Go to the Home tab and select No Fill in Fill Color.
This is the output.
Read More: [Fixed] Excel Gridlines Not Showing by Default
Frequently Asked Questions
1. Can I adjust the thickness of the gridlines in Excel?
No. The thickness of the gridlines is determined by Excel default settings.
2. Why are the gridlines not showing in Excel?
- The cell format may have overridden gridlines. Apply a default cell format or manually enable gridlines for specific cells.
- The zoom level may be too high. Adjust it.
Show Gridlines in Excel: Knowledge Hub
- How to Keep Gridlines When Copy and Paste in Excel
- How Do You Fix Missing Gridlines in Excel
- How to Get Gridlines Back in Excel
<< Go Back to Gridlines | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!