Show Gridlines in Excel 

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.

 Overview of showing gridlines in Excel


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.

Before adding gridlines

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.

Sheet after adding gridlines

  • Finally, you will find gridlines added to the sheet.

Add gridlines from ribbon


2. Add Gridlines from Excel Options

To add gridlines from Excel Options,

  • Click on the File menu and select the Options bar.

Select the option bar

  • Select the Advanced option.
  • Check in to the Show gridlines.
  • Click on OK.

Check in to gridlines option

  • You will find gridlines in the selected sheet.

After adding gridlines in the 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.

Add borders for specific cells

  • Gridlines or borders are added to the selected area.

Area after adding border


How to Change Color of Gridlines

To change the color of the gridlines,

  • Go to the File menu and select the Options bar.

Open the options tab

  • 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.

Choose gridlines color

  • You will find the red gridlines displayed in the selected sheet.

Find changes in gridlines color

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.

Check in to print option

  • By opening up the Print option or clicking on CTRL+ P, you will find the sheet with gridlines is ready to print.

Print layout with gridlines


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.

Uncheck gridlines option

  • You will find the sheet without gridlines.

Outcome of without gridlines in Excel


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.

Choose white color from the menu

  • You will find the sheet with invisible gridlines.

 Outcome of changing the background color


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.

Select format cells option

  • Expand the Color tab and select the white color.

Choose white color

  • Choose Outline and Inside from Presets.
  • Click on OK.

Unselect outlines and inside presets

  • You will find the gridlines are removed from the specific cells.

Find changes for selected 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.

Insert keyboard shortcut

  • You will find the gridlines are automatically removed from the selected sheet.

Outcome of keyboard shortcut for hiding gridlines


5. Remove Spreadsheet Gridlines Using a VBA Script

To apply VBA,

  • Go to the Developer tab and go to the Visual Basic option.

Open up visual basics

  • Go to the Insert bar and select the Module option.

Insert module

  • 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

Run the code

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.

Output after applying code


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.

Check out print option

  • You will find the sheet without gridlines while printing.

Hide 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,

No gridlines found after adding

  • To overcome this problem, select the entire sheet.
  • Go to the Home tab and select the No Fill from Fill Color option.

Add no fill option to show gridlines

  • Now you can find the gridlines in the sheet.

Guidelines showing in 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


<< Go Back to Gridlines | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Annyca Tabassum
Annyca Tabassum

Annyca Tabassum holds a BSc degree in Geography and Environment from Shahjalal University of Science and Technology, Bangladesh. She has a deep passion for Excel. As an Excel & VBA Content Developer for ExcelDemy, she not only provides solutions to complex issues but also demonstrates an enthusiastic mindset and adeptness in managing critical situations with finesse, showcasing his commitment to excellence. Apart from creating Excel tutorials, she is interested in Data Analysis with MS Excel, SPSS, Python Web... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo