Open In App

How to Remove Grid lines in Excel

Last Updated : 17 May, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

When you open the Excel sheet, you see a cross-section of rows and columns with grey-coloured lines that separate cells. Those gray-colored lines are known as gridlines in MS Excel. The grey color is the default color offered by Microsoft and one can change the color of the gridlines. These Guidelines can be helpful in reading data, but they might become distracting or undesirable when presenting or printing the final document.

Borders and Gridlines are two things that create confusion among users, Borders are customizable and one can change their color, type, and width but the same is not true for gridlines.  

Note: Gridlines are always applied on the whole worksheet or workbook, you can’t apply it on one cell or a set of cells. In this case, borders are applicable. 

What are Gridlines in Excel

In Excel, gridlines are the lines that separate the cells. They help you see where one cell starts and another one ends. Gridlines are like guides that make it easier to work with your data.

These lines are handy for things like calculations that involve lots of cells at once. They help you see which cells are part of the calculation. Gridlines also come in handy when you’re using macros, which are like shortcuts for doing tasks in Excel. Plus, when you want to make neat charts with numbers and labels, gridlines help you keep things organized and easy to read.

How to Remove Gridlines in Excel

Removing gridlines will make your Excel worksheet look like a blank document as shown below:

  • Using the view and page layout options
  • Changing the background color
  • Using Visual Basic for Applications (VBA)
  • Removing gridlines for specific cells in Excel

Worksheet without gridlines

How to Remove Grid Lines in Excel Using View and Page Layout Option

Step 1: Go to the Page Layout tab in the ribbon

Step 2: In Sheet Options, uncheck the View option under Gridlines

Sheet Options in ExcelUncheck Gridlines

Tip:  When multiple worksheets are selected, (Group) appears in the title bar of the worksheet. If you don’t want to remove gridlines from multiple sheets, click any unselected worksheet. If there is no unselected sheet then right-click the tab of a selected sheet, and then click Ungroup Sheets.

How to Show Gridlines in Excel in a Specific Area in the Worksheet

Gridlines can be easily shown if removed from the Excel worksheet. You can either have the gridline visible in the worksheet or hide it completely. There is no way to show this is in a specific area.

You can rather use borders to give a gridline effect in a specific area in the worksheet. Borders come with many options, one of them is it can make it look exactly like gridlines( by selecting a light grey color).

How to Change the Color of the Gridlines in Excel

You can also change the color of the Gridlines in Excel, you have the feature to customize it to your preference. Follow the below steps to change the color of the Gridlines:

Step 1: Click on File in the Ribbon, and select Options

select- options

Step 2: Choose the Advanced Option from the left pane

Select Advanced.

Step 3: Scroll Down to the section Display options for this Worksheet

Find the “Gridline Color ” at the bottom of the section and select the desired color of the Gridlines.

Select Color

Step 4: Click Ok

How to Remove Gridlines for Specific Cells in Excel

To get rid of gridlines for specific cells in Excel, you can make them look like they don’t have any lines by doing this:

Step 1: Pick the cells where you want to Remove the lines

Hold down the SHIFT key and click on the last cell in the group you want to affect. Or, you can just press CTRL+A to select everything in the whole sheet.

Step 2: Right-click on the Selected Cells

Step 3: Choose Format Cells from the menu that pops up

You can also press CTRL+1 to open the Format Cells box.

Screenshot-(292)

Select the Format Cells

Step 4: Click on the Border Option

Now, pick the color white from the color choices.

Step 5: Make sure to check both the Outline and Inside boxes

Screenshot-(293)

Select Color White > Choose outline and Inside presets and Pess OK

Step 6: Click OK

Step 7: Preview the Result

By doing this, you’ll make those cells appear as if they have no gridlines.

Screenshot-(295)

Preview the Result

Things to Remember

  • These changes will affect only the gridline color of the particular (Active) Worksheet. You can also select multiple sheets by holding the Control key and clicking on their tabs. This will put the workbook in Group Mode, as indicated at the top of the workbook where the name is displayed. After making these changes, the gridlines will be applied to all the worksheets.
  • Don’t forget to Ungroup the sheets(right-click on the tab and select “Ungroup”) if you don’t want to work with individual sheets separately and not on multiple sheets.
  • Changing the Gridline color doesn’t alter the default color. When you insert the new worksheet it should show the original grey color gridlines.

How to Remove Gridlines Using VBA

To disable gridlines in Excel automatically using Visual Basic for Applications (VBA), you can follow these steps:

Step 1: Enable the Developer Tab

Go to the “File” menu and choose “Excel Options.”

Select “Customize Ribbons.”

Check the “Developer” box.

Click “OK” to add the Developer tab to your Excel ribbon.

Screenshot-(296)

Turn on the Developer Tab

Step 2: Insert a VBA Module

Click the “Developer” tab.

On the far left side, click “Visual Basic.”

In the Project Explorer, right-click the “VBAProject” with your workbook’s filename.

Choose “Insert” from the dropdown menu and then select “Module.”

Screenshot-(297)

Insert a VBA Module

Step 3: Insert or Paste Your VBA Code

Type or paste your VBA code into the module. You can copy code from external sources as Excel allows pasting code from the internet.

Add a Command Button

Step 4: Return to the Excel document

Click the “Developer” tab again.

Select “Insert,” and under ActiveX Controls, choose “Command Button.”

Double-click the command button to create it.

In the dialog box that appears, type or paste your VBA code, then close it.

Step 5: Run the Macro

Click the “Macros” button in the Developer tab.

Select your macro (in this case, the one that hides gridlines).

Click “Run” to execute the code. This code will hide the gridlines throughout the workbook.

Screenshot-(299)

RUN the Macro

Step 6: Preview the Result

Screenshot-(300)

Gridlines removed

How to Print the Gridlines in Excel

By default, the gridlines in Excel are not printed when you print a worksheet. But if you want the gridlines to be printed, follow the below steps :

Step 1: Go to the Page Layout tab in Exel

Step 2: Find the Gridlines section and check the Print Checkbox

In the Sheet Options group, find the Gridlines section and check the Print Checkbox

Select- Page layout

Step 3: Now the Gridlines will be Printed on Printing the Worksheet

Note: Gridlines are not printed by default, borders around cells are always printed, and cell borders can be used as an alternative if you want the visible lines in your printed documents.



Next Article

Similar Reads