Hiding Gridlines in Excel

Hiding gridlines in Excel is a common task and most Excel users should know about it. It makes your spreadsheet clean and presentable. Although grid lines in excel have their own benefits but in some cases, it is better to hide them.

What are Gridlines?

A spreadsheet contains cells and gridlines or grid bars represent the borders of these cells. Gridlines are the faint lines on your spreadsheet that help you to distinguish the cell boundaries.

What are gridlines ?
Uses of Gridlines

1. They make it easier for you to align text or objects by giving you a visual cue.

2. They help you to distinguish between cell boundaries.

3. They make your data-tables more readable especially when they are without a border.

Gridlines are hidden during printing but if you want you can show them explicitly.

Method 1: Hide Excel Gridlines Using the Option in the Ribbon

Excel has a default option to hide these mesh lines.

For Excel 2007 and Onwards

  • Navigate to the “View” tab on the Excel ribbon.

Gridlines_Option_in_Excel_Ribbon

  • Uncheck the “Gridlines” checkbox and the grid bars will be hidden.
  • Or you can also hide the grid lines from the “Page layout” and uncheck the Gridlines “View” option.

Gridlines_Option_in_Excel_2

For Excel 2003 and Earlier

  • Navigate to “Tools” > “Options”.

Gridlines_Option_in_Excel_2003

  • Now, a dialog box will open. Navigate to the “View” tab and then uncheck the “Gridlines” option and click ‘OK’. This will hide these annoying lines.

Method 2: Make Gridbars Invisible by changing Background Color

Another obvious way to hide the gridlines in excel is by changing their background color so that it matches the worksheet background. This can be done by using the following steps:

  • First of all, select all the rows and columns of the spreadsheet by pressing “Ctrl + A”. Alternatively you can also click the little triangle icon under the “Name box”.
  • With all the cells selected, click the “Fill Color” option and select the white color.

Gridlines_Gone_By_changing_background

  • Now, all the gridlines will be hidden.

Method 3: Hiding Gridlines by Using Excel Shortcut

If you are someone who loves to see a keyboard as compared to a mouse then here is the shortcut key for you. You can use the “Alt + WVG” key combination to hide the excel grid bars.

Method 4: Hide Spreadsheet Gridlines using a VBA Script

If you want to hide the gridlines by using a macro then you can use the below code. This code hides the gridlines if they are visible but if the gridlines are already hidden then it displays a message saying “Gridlines are already hidden!"

Sub Hide_Mesh()
If ActiveWindow.DisplayGridlines Then
ActiveWindow.DisplayGridlines = False
Else
MsgBox "Grid lines are already hidden!"
End If
End Sub

Hide Gridlines While Printing the Sheet

To hide the gridlines while printing the sheet follow the below steps:

  • Navigate to the “Page Layout” tab and uncheck the “Print” option under the Gridlines area. Or you can also use the “ALT + PPG” key combination to do this.
  • After this print, the spreadsheet and the gridlines won’t be visible.

How to Bring the Gridlines Back if they are Already Hidden

If your grid lines are invisible by default and you want to show them up, then just check back the gridlines option that we have unchecked in Method 1. Alternatively, you can also press the keys “Alt + WVG” to make the grid bars visible again.

So, this was all how to hide gridlines in excel. Do share your thoughts and ideas related to the topic.

Recommended Reading: How to create a Checkbox in excel

About Ankit Kaul

Well, I am Ankit Kaul, the founder of Excel Trick. I am a die-hard fan of Microsoft Excel and have been working with spreadsheets for the past 10+ years. My only aim is to turn you guys into 'Excel Geeks'. Check out more about me here.