How to Hide Gridlines in Excel (7 Easy Methods)

By default, the Gridlines are shown as gray lines in an Excel file. Those lines help us better visualize the data. However, we may want to hide the Gridlines sometimes, and if we have a lot of sheets in our workbook, then it will take a lot of time to do that. So, to do it faster, we can apply Excel some features and Excel VBA Macros to it. In this article, we will show you seven quick and suitable ways to hide Gridlines in Excel effectively with appropriate illustrations.


Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.


Introduction to Gridlines

The gray horizontal and vertical lines that separate the cells in a worksheet in Excel are called gridlines. Users are guided by the gridlines to distinguish between the various cells and read the data in a systematic way. Additionally, they make it easier for users to move around the worksheet’s columns and rows.

Users would have trouble viewing the data without gridlines because it wouldn’t be organized. Additionally, gridlines and cell boundaries, which are applied to particular areas of the worksheet, are frequently confused by users. In contrast to borders, gridlines are visible throughout the entire worksheet and cannot be added to a particular area of the worksheet. Additionally, when printing a worksheet, the borders that have been added appear, but the gridlines are not displayed on the paper.


7 Suitable Ways to Hide Gridlines in Excel

Let’s say, we have a dataset that contains information about several sales representatives of the XYZ group. The name of the sales representatives, types of products, and the revenue earned by the sales representatives are given in columns B, C, and D respectively. We will hide gridlines by applying the Keyboard Shortcuts, View tab, Fill Color command, VBA macros, and so on. From our dataset, we can easily hide gridlines using those features. Here’s an overview of the dataset for today’s task.

how to hide gridlines in excel


1. Apply Keyboard Shortcuts to Hide Gridlines

In this section, we will apply the keyboard shortcuts to hide the gridlines in Excel, and the keyboard shortcuts are  Alt + W + V + G . On your keyboard press those keys one after another. To do it easily, look at the GIF below.

Apply Keyboard Shortcuts to Hide Gridlines

Read More: How to Hide Gridlines on Part of a Sheet in Excel (2 Quick Ways)


2. Use View Tab to Hide Gridlines

In this method, we will use the View tab to remove the gridlines in Excel. From our dataset, we can easily do that. Let’s follow the instructions below to learn!

Steps:

  • First of all, look at the below screenshot.

Use View Tab to Hide Gridlines

  • Now, from the View tab, go to,

View → Show → Gridlines (Uncheck it)

  • As a result, you will be able to hide gridlines in Excel which has been given in the below screenshot.

Read More: How to Remove Gridlines in Excel for Specific Cells (2 Quick Methods)


3. Perform Fill Color Option to Hide Gridlines for Specific Cells

Now, we will fill the background color with light green using the Fill Color option to hide gridlines in Excel. To do that, follow the instructions below.

Steps:

  • First of all, select the dataset from where you want to hide the gridlines. We will select A1 to E15 for the convenience of our work.

Perform Fill Color Option to Hide Gridlines

  • After that, from your Home tab, go to,

Home → Font → Fill color

  • Hence, select a color to fill the background for hiding the gridlines. We choose a light green As a result, you will be able to hide gridlines in Excel which has been given in the below screenshot.

Perform Fill Color Option to Hide Gridlines

Read More: Excel Fix: Gridlines Disappear When Color Added (2 Solutions)


4. Delete Gridlines Using Sheet Options Command

Obviously, using the Sheet Options command is the easiest and most time-saving way to hide gridlines in Excel. Let’s follow the instructions below to hide gridlines!

Steps:

  • First of all, look at the below screenshot. You will see the dataset with gridlines.

Hide Gridlines Using Sheet Options Command

  • Hence, from the Page Layout tab, go to,

Page Layout → Sheet Options → Gridlines  → View (Uncheck it)

  • As a result, you will be able to hide gridlines in Excel which has been given in the below screenshot.

Read More: Why Do Gridlines Disappear in Excel? (5 Reasons with Solutions)


5. Remove Gridlines from Excel Chart

We can simply remove the gridlines from the Excel graph using the delete key or delete option. For this, we just need some simple clicks. Let’s follow the instructions below to learn!

Steps:

  • Firstly, select any gridlines by clicking on one of them except the first gridline.
  • Secondly, click on the Delete context menu option.

Remove Gridlines from Excel Chart

  • As a result, simply just following these steps will remove the gridlines from your excel chart.

Read More: How to Remove Gridlines in Excel Graph (5 Easy Methods)


6. Hide Gridlines in Excel When Printing

We can use the Page Setup dialogue box to customize the elements of our excel worksheet. Let us see how we can hide the gridlines in excel when printing using this feature.

Steps:

  • To begin with, go to the Page Layout tab and then Page Setup.
  • Now, click on the arrow at the lower-right corner of this section as shown below.

Hide Gridlines in Excel When Printing

  • Next, in the Page Setup window, go to the Sheet tab.
  • Now, under the Print section, uncheck the option Gridlines.
  • Finally, press OK and Excel will hide the gridlines when printing this worksheet.


7. Run VBA Code to Hide Gridlines

Last but not least, I’ll show how to hide gridlines in Excel by using a simple VBA code. It’s very helpful for some particular moments. From our dataset, we will remove gridlines in Excel applying VBA code. Let’s follow the instructions below to learn!

Step 1:

  • First of all, open a Module, to do that, firstly, from your Developer tab, go to,

Developer → Visual Basic

Run VBA Code to Hide Gridlines

  • After clicking on the Visual Basic ribbon, a window named Microsoft Visual Basic for Applications – Hide Gridlines will instantly appear in front of you. From that window, we will insert a module for applying our VBA code. To do that, go to,

Insert → Module

Run VBA Code to Hide Gridlines

Step 2:

  • Hence, the Hide Gridlines module pops up. In the Hide Gridlines module, write down the below VBA
Sub Hide_Gridlines()
Dim x As Worksheet
Set x = Worksheets("VBA")
'Gridlines in "VBA" will be hidden
x.Activate
ActiveWindow.DisplayGridlines = False
End Sub

Run VBA Code to Hide Gridlines

  • Hence, run the VBA To do that, go to,

Run → Run Sub/UserForm

  • After running the VBA Code go back to your Excel worksheet, you will be able to see that there is no gridlines in the worksheet which have been given in the below screenshot.

Run VBA Code to Hide Gridlines

Read More: How to Show Gridlines after Using Fill Color in Excel (4 Methods)


Bottom Line

  • You can hide gridlines in Excel using  Alt + W + V + G  as the keyboard shortcuts.
  • You can pop up Microsoft Visual Basic for Applications window by pressing Alt+F11 simultaneously.
  • If a Developer tab is not visible in your ribbon, you can make it visible. To do that, go to,

File → Option → Customize Ribbon


Conclusion

I hope all of the suitable steps mentioned above to hide gridlines will now provoke you to apply them in your Excel spreadsheets with more productivity. You are most welcome to feel free to comment if you have any questions or queries.


Related Articles

Md. Abdur Rahim Rasel

Md. Abdur Rahim Rasel

Hi! I'm Md. Abdur Rahim Rasel. Welcome to my Profile. Currently, I am working and doing research on Microsoft Excel and here I will be posting articles related to this. I have completed my graduation in Naval Architecture and Marine Engineering(NAME) from Bangladesh University of Engineering and Technology(BUET). I have a passion for learning new things with my knowledge through perseverance and hard work.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo