How to Remove Grid lines in Excel
Last Updated :
17 May, 2024
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

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


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
.png)
Step 2: Choose the Advanced Option from the left pane
.png)
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.
.png)
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.
.png)
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
.png)
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.
.png)
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.
.png)
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.”
.png)
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.
.png)
RUN the Macro
Step 6: Preview the Result
.png)
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
.png)
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.
Similar Reads
How to Remove Lines in Google Docs
Have you ever encountered unwanted lines in Google Docs that disrupt the flow of your document? Whether itâs a table border, a horizontal line created by typing hyphens or underscores, or paragraph borders, these lines can sometimes make your document look cluttered. The good news is, removing them
8 min read
How To Remove Green Line In Google Docs
Are you seeing a green line or a box with text in your Google Docs and can't figure out why it's there? This often happens when you're working with others on a document or when you're using suggestion mode. These green marks are just signs that show where changes are being made or suggested. This wi
6 min read
How to Remove Spaces in Excel
Have you ever wondered you keep searching data on Excel but it is not returning any values and many times you are trying to add columns or data but you are unable to do so? Well, these are some common problems we all have faced in our life. But do you know why it happens? This happens because of ext
8 min read
How To Remove Line Chart Fill in ChartJS?
In Chart.js, the fill property for Line Chart allows you to control whether the area under the line is filled with color. By default, this property is set to true, which means the area below the line is filled. However, you might want to remove this fill for a cleaner look or to highlight only the l
3 min read
How to Remove Table Formatting in Excel
Struggling with unwanted table formatting in Excel? Whether you're working on a crucial report or just cleaning up your spreadsheet, knowing how to remove table formatting in Excel can save you time and frustration. Excel tables come with predefined styles that can sometimes get in the way of your p
5 min read
How to Hide Zero Values in Excel
Microsoft Excel enables us to format, organize and calculate data in a spreadsheet. It's a great tool for preparing datasets and it makes those datasets easier for users and analysts to analyze the data. Sometimes these datasets contain zero values that are not required to be seen. Excel provides an
6 min read
How to Insert or Remove Page Breaks in Excel
Excel has the functionality to print its data directly from the Excel sheet itself. But here comes the problem, if you have data of 300 rows, then you cannot print the entire data on a single sheet of paper, data needs to be divided among different sheets equivalently. Excel can do this automaticall
8 min read
How To Remove A Column In R
R is a versatile language that is widely used in data analysis and statistical computing. A common task when working with data is removing one or more columns from a data frame. This guide will show you various methods to remove columns in R Programming Language using different approaches and provid
4 min read
How Do I Remove Grid Lines from a Bokeh Plot?
Bokeh is a powerful Python library for creating interactive and visually appealing visualizations for web browsers. While grid lines can help in interpreting the data in a plot, there are scenarios where you might want to remove them for a cleaner, more focused visualization. This article will guide
5 min read
How to Add Leader Lines in Excel?
Leader Lines are the lines that connect data labels and data points in a chart. Before excel 2013 leader lines were available only for pie charts but after excel 2013 update leader lines could be built for any type of chart. Leader lines make complex charts more understandable. Below is a pie chart
2 min read