In this article, you will learn the ins and outs of how to show gridlines in Excel. We will also discuss how to hide and change gridline’s color, how to print gridlines, how to apply shortcuts to show gridlines and many more methods.
Gridlines are the basic feature of an Excel file. While analyzing data it is quite important to show and hide the gridlines.
By clicking on the Gridlines ribbon in the View tab, you can easily manage the gridlines. But sometimes for the white background color, the gridlines cannot show. In this case, choose the No Fill option from Fill Color tab to show the gridlines.
Download Practice Workbook
You can download this practice workbook while going through the article.
How to Show Gridlines in Excel
1. Show Gridlines in Worksheet from Ribbon
You can see there are no gridlines added to 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 expand the Show group.
- Check in to the Gridlines option.
- Finally, you will find gridlines added to the sheet.
2. Add Gridlines from Excel Options
To add gridlines from Excel Options,
- Click on the File menu and select the Options bar.
- Select the Advanced option.
- Check in to the Show gridlines.
- Click on OK.
- You will find gridlines in the selected sheet.
3. Input Gridlines in a Specific Area in the Worksheet
If you want to add gridlines for specific cells or area, there is no direct way to do so. But by applying an alternative method, you can do this,
- Select range B4:B12 to insert gridlines.
- Go to the Home tab and expand the Border option.
- Choose All Borders option from the list.
- Gridlines or borders are added to the selected area.
How to Change Color of Gridlines
To change the color of the gridlines,
- Go to the File menu and select the Options bar.
- Select the Advanced option.
- Change the color from the Gridline color option.
- Here we select red as the color of the gridline and click OK.
- You will find the red gridlines displayed in the selected sheet.
Read More:Â How to Show Gridlines after Using Fill Color in Excel
How to Print Gridlines in Excel
To print sheets with gridlines,
- Go to the Page Layout tab and expand the Sheet Options.
- Mark the Print option in Gridlines.
- By opening up the Print option or clicking on CTRL+ P, you will find the sheet with gridlines is ready to print.
How to Hide Gridlines in Excel
1. Hide Gridlines in Whole Worksheet from Ribbon
To hide the gridlines,
- Select the entire sheet or click on CTRL+A.
- Go to the View tab and expand the Show group.
- Check out the Gridlines options.
- You will find the sheet without gridlines.
2. Invisible Gridlines by Changing Background Color
To hide the gridlines by changing the background color,
- Select the entire sheet and go to the Home tab.
- Expand the Fill Color option.
- Change the background color from No Fill to White.
- You will find the sheet with invisible gridlines.
3. Remove Gridlines for Specific cells
To remove gridlines from some selected cells or specific areas,
- Select the desired cells and right-click on the mouse.
- Select the Format Cells option.
- Expand the Color tab and select the white color.
- Choose Outline and Inside from Presets.
- Click on OK.
- You will find the gridlines are removed from the specific cells.
4. Hide Gridlines by Using Excel Shortcut
- Open up the desired sheet from where you want to remove the gridlines.
- Click on ALT + W+ V + G.
- You will find the gridlines are automatically removed from the selected sheet.
5. Remove Spreadsheet Gridlines Using a VBA Script
To apply VBA,
- Go to the Developer tab and go to the Visual Basic option.
- Go to the Insert bar and select the Module option.
- Insert the following code in the module.
- Then, click on Run button to run the code.
Sub Hide_Mesh()
If ActiveWindow.DisplayGridlines Then
ActiveWindow.DisplayGridlines = False
Else
MsgBox "Grid lines are already hidden!"
End If
End Sub
Code Explanation
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 this condition is true, it means that gridlines are currently being displayed in the active window.
- If the condition is true, the code block following the If statement is executed. In this case, the line ActiveWindow.DisplayGridlines = False is executed. It sets the DisplayGridlines property of the active window to False, which means the gridlines will be hidden.
- If the condition in the If statement is false, the code block following the Else statement is executed. In this case, it displays a message box with the text “Grid lines are already hidden!” indicating that the gridlines are already not being displayed.
- You will find the gridlines are removed from the sheet.
6. Hide Gridlines While Printing the Sheet
To hide gridlines while printing,
- Go to the Page Layout tab and expand the Sheet Options.
- Uncheck the Print option.
- You will find the sheet without gridlines while printing.
Fix! Gridline is Not Showing in Excel
After checking into the gridlines, you are not able to see it. The reason is the fill color of the gridlines. The below image shows the consequences,
- To overcome this problem, select the entire sheet.
- Go to the Home tab and select the No Fill from Fill Color option.
- Now you can find the gridlines in the sheet.
Read More: [Fixed] Excel Gridlines Not Showing by Default
Things to Remember
- To show the gridlines always check in to the Gridlines option in the View tab.
- If you want to show the default color of the gridlines, the fill color must be No Fill.
- To print a sheet with gridlines, check in to the Print option in the Page Layout tab.
Conclusion
We believe after completing the article, you do not have any confusion about hiding and showing gridlines in Excel. You will be able to use gridlines efficiently in your analysis. To explore more about gridlines and enrich your knowledge, you can also visit the knowledge hub section. After all of that, if any confusion arises, you can comment below. We will always be there to solve your problems.
Frequently Asked Questions
1. Can I adjust the thickness of gridlines in Excel?
Unfortunately, Excel does not provide an option to adjust the thickness of gridlines directly. The thickness of gridlines is determined by the default settings of Excel and the zoom level of the worksheet.
2. Why are my gridlines not showing in Excel?
If gridlines are not visible in Excel, it could be due to the following reasons:
- Gridlines might be hidden. Check the Gridlines checkbox in the Show group on the View tab to make sure it is enabled.
- The cell formatting may have overridden gridlines. Apply a default cell format or manually enable gridlines for the specific cells.
- The zoom level might be too high. Adjust the zoom level to make gridlines visible.
3. Why does Excel show gridlines?
Excel shows gridlines to provide a visual reference for the cells in a worksheet. Gridlines make it easier to distinguish individual cells and align data. The other vital reasons are:
- Gridlines help users align data accurately within cells.
- It improves the readability of the worksheet by separating cells from each other.
- Â When entering or editing data in Excel, gridlines help users maintain a structured layout.
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!