Gridlines in Excel

The gray-colored horizontal and vertical lines that separate cells, rows, and columns in a spreadsheet

Author: Christopher Haynes
Christopher Haynes
Christopher Haynes
Asset Management | Investment Banking

Chris currently works as an investment associate with Ascension Ventures, a strategic healthcare venture fund that invests on behalf of thirteen of the nation's leading health systems with $88 billion in combined operating revenue. Previously, Chris served as an investment analyst with New Holland Capital, a hedge fund-of-funds asset management firm with $20 billion under management, and as an investment banking analyst in SunTrust Robinson Humphrey's Financial Sponsor Group.

Chris graduated Magna Cum Laude from the University of Florida with a Bachelor of Arts in Economics and earned a Master of Finance (MSF) from the Olin School of Business at Washington University in St. Louis.

Reviewed By: David Bickerton
David Bickerton
David Bickerton
Asset Management | Financial Analysis

Previously a Portfolio Manager for MDH Investment Management, David has been with the firm for nearly a decade, serving as President since 2015. He has extensive experience in wealth management, investments and portfolio management.

David holds a BS from Miami University in Finance.

Last Updated:September 30, 2023

What Are The Gridlines in Excel?

These are the gray-colored horizontal and vertical lines that separate a spreadsheet's cells, rows, and columns. If it were not for these intersecting lines, it would have been difficult to differentiate between the data in two adjacent cells.

When you open the spreadsheets, the lines are visible by default. This concept is simple - Excel wants you to have organized rather than disoriented data. Unfortunately, many confuse these lines with borders, but both are entirely different things. 

These help you to work efficiently on Excel spreadsheets while using borders can add emphasis to important cells. If someone opens Excel, they will understand that the data enclosed in the frame is essential.

These grid lines can be customized with the ability to change their color, thickness, and pattern of the lines per the users' requirements. 

Usually, when you print an Excel file, these are ignored by default. However, you can set up a printing option in such a way that Excel prints those lines on paper.

Key Takeaways

  • Gridlines in Excel are the gray-colored horizontal and vertical lines that separate cells, rows, and columns, aiding in data organization and differentiation.
  • Gridlines can be removed or hidden in Excel to achieve a cleaner and more organized spreadsheet.
  • Gridlines can be hidden from the "View" tab or through the "Options" menu, allowing customization of their color and appearance.
  • To remove gridlines from specific parts of a spreadsheet, you can change the background color or border color of selected cells, effectively hiding the intersecting lines.

How to Remove Gridlines in Excel?

You can remove the intersecting lines from the spreadsheets in two ways. But, again, the question that might arise is why even remove the lines when it makes working on Excel easier. 

To begin with, it can make your spreadsheets more clean and tidy. Sometimes, you do not need the lines as a visual guide to align different texts and images. For example, most analysts prefer hiding these while working on various financial models

1. Method #1: Hiding them from the View tab

These can be turned on or off primarily by using the associated function in the ribbons bar. This is the easiest method you can follow to hide the intersecting lines in Excel. The instructions that you need to follow are:

  • First, click on the 'View' tab at the top of the Excel spreadsheets.
  • Next, navigate the mouse pointer to the 'Show' section and untick the checkbox for Gridlines.

Spreadsheet showing Gridlines Option in the View Tool Bar

  • And that's it! You will notice that all the horizontal and vertical lines have disappeared from the spreadsheets immediately.

Image showing a spreadsheet without Gridlines

  • If you need to make the lines visible again, follow the same procedure and tick the box for 'Gridlines.' 
  • Alternatively, you can use the keyboard shortcut Alt + W + VG to hide or unhide those intersecting lines in Excel.

2. Method #2: Hiding them from Options

There is another way you can hide the intersecting lines. This method lets you change the color of the lines from the traditional 'light gray' to any color you prefer. To hide the lines:

  • Click on the File tab, navigate until the end to find the Options, and click on it. This will open up the dialog box as:

  • You need to click on the 'Advanced' option on the left side and scroll down to find the section for 'Display options for this Worksheet.'

  • If the lines are not visible, you need to tick the checkbox for 'Show gridlines.' But wait! That's not all, don't you like the color for the horizontal and vertical lines? 
  • You will find an option to change the Gridline color as well. We have changed the color to dark blue. Once done, click on the OK.

Image showing Excel Gridlines Color Option

  • You will find the changes in the spreadsheets as illustrated below:

Spreadsheet showing Gridlines In Blue Color

Removing gridlines from specific parts of spreadsheets

Sometimes you might need to remove the intersecting lines on a particular range of cells. Using the same technique as the above, you select the range of cells and use the keyboard shortcut Alt + W + VG to remove them. But this approach does not work.

Your logic behind hiding the lines was correct, but the method you followed does not work in Excel for a specific section of cells. So what else can you do?

Well, there are two different methods that you can follow to overcome this problem.

1. Method #1: Changing the background color

First, we will explore the 'Fill color' method to hide a specific part of lines within cells. 

  • Select the range of cells you want to remove the horizontal and vertical lines.
  • Next, click on the 'Fill color' tool and select the white color. The white color will be in the first position in the color palette.

Image showing Color Palette option in the Spreadsheet

  • After you have selected the color, the intersecting lines around the selected range of cells will automatically disappear.

Spreadsheet showing a table with Calculations and Result

  • Since now, you have selected the white color for the palette if you need to hide the lines for other cells, select the range of cells and press the keyboard shortcut of Alt + H + H followed by the Esc key, and finally, press Spacebar.

2. Method #2: By changing the border's color

Another method that allows you to hide the lines around the cell is changing the border color. Since you were presented with the process behind the first method, you already know what we will do next.

  • Click on Borders, which you will find in the Home tab, navigate to the 'Line Color and select the white color.

Spreadsheet showing Borders Option and Option to change color of Borders

  • Now, select the range of cells for which you want to hide the horizontal and vertical cells adjoining two cells.
  • Again, click on borders and select 'All Borders.' Why 'All Borders' though? The logic is simple; you want to hide the lines from all the sides of a cell. Of course, you may individually hide the lines, but that's just a pain in the rear.

Spreadsheet showing Borders Option and Option add All Borders

  • You will get the result as illustrated below:

Spreadsheet showing Calculations And Results

 

Note

After selecting the white color from the palette, you will notice that the cursor changes to the pen. This tool will allow you to remove them, but it's not efficient to use it directly. So instead, press the Esc key, select the range of cells, and apply the 'All Borders.'

Removing gridlines from multiple spreadsheets

If you press the keyboard shortcut of Alt + W + VG, you will see that all the horizontal and vertical lines separating cells disappear in the spreadsheet. However, does it also hide the gridlines on other spreadsheets in the workbook? 

Not really! There is a one-step process that you must follow to remove lines from all the spreadsheets altogether.

  • Right-click on the sheet tab and select the option for 'Select All Sheets 

Spreadsheet showing Options related to rows and columns

  • Now you can remove the gridlines by using the keyboard shortcut of Alt + W + VG. Once done, all the spreadsheets will appear blank without horizontal and vertical lines.

Spreadsheet showing Calculations And Results

Printing gridlines in Excel

If you try to print the data from your spreadsheets, you will see that intersecting lines will not be printed. This is because excel ignores the lines since they are just for 'reference' and provides cleaner results when printed into PDFs or on paper. 

But let's assume that sometimes you might also need to print the gridlines.

For this, you need to make a few changes in Excel.

  • Click on the Page Layout tab and navigate the 'Sheet Options' section.
  • For gridlines, tick the checkbox for 'Print.'

Image showing Menu Bar

  • Once you have made the changes, you should be able to print the lines along with the data from the spreadsheets.

Benefits & Drawbacks of Gridlines

Just as with any other application or feature, having them in the spreadsheet has its benefits and drawbacks.

Some of the benefits of these lines in the spreadsheet are:

  • With a simple keyboard shortcut of Alt + W + VG, you can hide/unhide the lines, which make a great tool to have organized data.
  • The intersecting lines can add equality and a better balance between two adjacent cells, making them visually appealing to the user.
  • They can act as a reference for the design process for dashboards.
  • Using these lines, you can divide the cells into equal proportions and have better data alignment.

On the other hand, the drawbacks of having them in the spreadsheet are:

  • 'Sometimes', these intersecting lines can hinder your creativity. For example, if you have these reference lines, all you would think is how I can fit this dashboard component in just six cells.
  • Without these lines, you can set your cell size and the proportion between two adjacent cells and make changes that make the financial models much better for visual understanding.

Researched and Authored by Akash BagulLinkedIn

Edited by Colt DiGiovanni | LinkedIn

Free Resources

To continue learning and advancing your career, check out these additional helpful WSO resources: