How to Show the Gridlines in Excel – 3 Methods

This is an overview.

 Overview of showing gridlines in Excel


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:

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 select Show.
  • Check Gridlines.

Sheet after adding gridlines

This is the output.

Add gridlines from ribbon


Method 2 – Add Gridlines using the Excel Options

  • Click File and select Options.

Select the option bar

  • Select Advanced.
  • Check Show gridlines.
  • Click OK.

Check in to gridlines option

This is the output.

After adding gridlines in the sheet


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.

Add borders for specific cells

This is the output.

Area after adding border


How to Change the Color of Gridlines

  • Click File and select Options.

Open the options tab

  • Select Advanced.
  • Choose a color in Gridline color. Here, red.
  • Click OK.

Choose gridlines color

This is the output.

 

Find changes in gridlines color

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.

Check in to print option

  • Click Print or press CTRL+ P, you will see the sheet with gridlines.

Print layout 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.

Uncheck gridlines option

This is the output.

Outcome of without gridlines in Excel


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.

Choose white color from the menu

This is the output.

 Outcome of changing the background color


3. Remove the Gridlines from Specific cells

  • Select the cells and right-click.
  • Select Format Cells.

Select format cells option

  • Select Color and choose white.

Choose white color

  • Choose Outline and Inside in Presets.
  • Click OK.

Unselect outlines and inside presets

This is the output.

Find changes for selected cells


4. Hide the Gridlines Using an Excel Shortcut

  • Press ALT + W+ V + G.

Insert keyboard shortcut

This is the output.

Outcome of keyboard shortcut for hiding gridlines


5. Remove the Gridlines Using a VBA Code

  • Go to the Developer tab and select Visual Basic.

Open up visual basics

  • In Insert, select Module.

Insert 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

Run the code

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.

Output after applying code


6. Hide Gridlines While Printing the Sheet

  • Go to the Page Layout tab and select Sheet Options.
  • Uncheck Print.

Check out print option

This is the output.

Hide gridlines while printing


Gridlines are Not Showing in Excel – Solution

Gridlines are not visible because of the fill color:

No gridlines found after adding

  • Select the entire sheet.
  • Go to the Home tab and select No Fill in Fill Color.

Add no fill option to show gridlines

This is the output.

Guidelines showing in sheet

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


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