Gridlines are displayed by default in our Excel worksheet and workbook. They are horizontal and vertical gray-colored lines that help the users to differentiate between cells in a worksheet. They also ease the navigation between the worksheet columns and rows. But, the gridlines disappear as soon as we apply the Fill Color feature to color the cells. And many times, this is not desired. In this article, we will show you the simple yet effective methods to Show Gridlines after Using Fill Color in Excel.
Download Practice Workbook
Download the following workbook to practice by yourself.
To illustrate, we will use a sample dataset as an example. For instance, we have colored the range B4:D10 in the following dataset using the Fill Color feature in Excel. As a result, the gridlines have disappeared from that range.
4 Methods to Show Gridlines after Using Fill Color in Excel
1. Show Gridlines with Borders Drop-Down Feature after Applying Fill Color in Excel
Excel provides many different features and we use them to carry out numerous operations. In our first method, we’ll use the Borders Drop–Down feature to Show Gridlines after Using Fill Color in Excel. Therefore, follow the steps below to perform the task.
- First, select the colored range B4:D10.
- Then, go to Home ➤ Font ➤ Borders.
- After that, click the Borders Drop–Down icon.
- Subsequently, select All Borders.
- Finally, it’ll return the gridlines to the desired area.
2. Custom Cell Style to Make Gridlines Visible after Using Fill Color
Moreover, we can create a Custom Cell Style to show gridlines in the colored range of cells. In the following dataset, we have the range B4:D10 that we want to highlight in Blue color. So, learn the steps properly to carry out the operation.
- Firstly, select Home ➤ Styles ➤ Cell Styles ➤ New Cell Style.
- As a result, the Style dialog box will pop out.
- Now, type Custom in the Style name.
- Next, press Format.
- Consequently, a new dialog box will emerge.
- Then, under the Fill tab, select the Blue color.
- Afterward, under the Border tab, select the Gray color from the Color Here, we select Gray to match the color of the Gridlines.
- Subsequently, press OK.
- At last, you’ll see the highlighted range as well as the gridlines in that range.
- How to Keep Gridlines When Copy and Paste in Excel (2 Ways)
- How to Get Gridlines Back in Excel (5 Possible Solutions)
- [Fixed!] Missing Gridlines in Excel When Printing (5 Solutions)
3. Use Excel Format Cells Feature to Show Gridlines after Applying Fill Color
Another useful feature in Excel is the Format Cells feature with which we can make the gridlines visible after using the Fill Color. Hence, follow the process to perform the task.
- In the beginning, select the colored range B4:D10.
- Next, press the keys ‘Ctrl’ and ‘1’ simultaneously.
- Consequently, the Format Cells dialog box will appear.
- After that, go to the Border tab and select the Gray color in the Color field.
- Then, select the Outline and Inside from the Presets.
- In the end, press OK and so, it’ll return the gridlines.
4. Show Gridlines after Using Fill Color with Excel VBA Code
In our last method, we will apply the Excel VBA Code to show gridlines. In the below dataset, we have the cell values in the range B4:D10 and we are yet to color the range. Therefore, learn the process to Show Gridlines after Using Fill Color in Excel.
- First of all, go to Developer ➤ Visual Basic.
- As a result, the VBA window will appear, and double-click ThisWorkbook which you’ll find in the left-most pane.
- Consequently, a dialog box will emerge.
- Now, copy the following code and paste it into the box.
Dim rng As Range Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) On Error Resume Next If Not rng Is Nothing Then DrawBorders rng Set rng = Target End Sub Private Sub DrawBorders(ByVal rg As Range) Dim cells As Range Application.ScreenUpdating = False For Each cells In rg If cells.Interior.ColorIndex = xlNone Then With cells.Borders If .ColorIndex = 15 Then .LineStyle = xlNone End If End With Else With cells.Borders If .LineStyle = xlNone Then .Weight = xlThin .ColorIndex = 15 End If End With End If Next Application.ScreenUpdating = True End Sub
- Next, save the code and close the VBA window.
- Lastly, highlight the range B4:D10 in Blue color and the gridlines will appear automatically.
Henceforth, you will be able to Show Gridlines after Using Fill Color in Excel with the above-described methods. Keep using them and let us know if you have any more ways to do the task. Don’t forget to drop comments, suggestions, or queries if you have any in the comment section below.