4 Ways to Make Gridlines Darker in Microsoft Excel

This post is going to show all the ways that you can change the gridline color and make them darker in your Excel workbooks.

The default gridlines in Excel are a very light gray and can sometimes be hard to see.

Excel allows users to adjust the color and thickness of the gridlines to suit their needs. Making the gridlines darker can help make them more visible, making it easier to differentiate between cells.

Whatever your preference there are options to customize your gridlines. Get your copy of the example workbook used in this post and follow along!

Make Gridlines Darker with Excel Options

When you need to change any sort of setting, the first place you should look is the Excel Options menu.

This is where a lot of customization can be set in Excel.

You’ll be able to make the gridlines darker by changing the gridline color to black or a similar darker color depending on your preference.

Follow these steps to change the gridlines to a darker color.

  1. Go to the File tab.
  1. Select Options in the backstage area.
  1. Go to the Advanced settings in the Excel Options menu.
  2. Scroll down to the Display options for this worksheet section.
  3. Select the Sheet from the dropdown in which to change gridline colors.
  4. Click on the Gridline color icon.
  5. Choose a color from the color options.
  6. Press the OK button.

📝 Note: You will need to update this setting for each sheet in your workbook.

Your gridlines will now appear darker with your chosen color!

Make Gridlines Darker with Home Tab

Do you want to make the gridlines in your sheet thicker and darker? Then you will need to add borders to all the cells in your sheet.

The Excel Options menu does not allow you to adjust the gridline thickness, but using the cell border format will allow you to adjust both the color and thickness.

Here’s how you can change the color and size of the gridlines.

  1. Click on the button at the intersection of the row and column headings.

💡 Tip: You can also use the Ctrl + A keyboard shortcut to select the entire sheet.

  1. Go to the Home tab.
  2. Click on the Border options in the Font section.
  3. Choose All Borders from the options.

You can also choose the More Borders option to open the Cell Format dialog box. This is where you will be able to adjust the line thickness and color.

You can also open Format Cells menu by using the Ctrl + 1 keyboard shortcut.

Choose a new line Style and Color. Click on the Outline and Inside button to apply these new settings to the cells and then press the OK button.

All your cells in the sheet will get the updated cell borders!

Make Gridlines Darker in All Sheets with VBA

When you need to automate a task in the desktop version of Excel, then VBA is the way to get it done.

The Excel Options menu makes changing the gridline color for each sheet a tedious task.

You can automate this with VBA so that you can set the gridline color for all your sheets by running a macro.

Go to the Developer tab and select the Visual Basic option from the ribbon or use the Alt + F11 keyboard shortcut.

This will open the visual basic editor and you will be able to add any VBA code here that you might want to run.

💡 Tip: Check out this post to see how you can add the Developer to your Excel ribbon.

Go to the Insert menu and select the Module option to create a new module for your VBA code.

Sub ChangeGridlineColor()
    Dim sheet As Worksheet
    For Each sheet In Worksheets
        sheet.Activate
        ActiveWindow.GridlineColor = RGB(0, 0, 0)
    Next sheet
End Sub

Paste the above VBA code into your visual basic editor module.

This VBA code will loop through each sheet in your workbook and set the gridline color based on the RGB code supplied. In this example RGB(0, 0, 0) will set the gridline color to black.

📝 Note: The Excel Options gridline color selection is limited, but with the VBA code, you will be able to set any color using its RGB description.

After you run the VBA code, all your sheets will have a darker grlidline color!

Make Gridlines Darker in All Sheets with Office Scripts

If you are using Excel online, then there is no possibility of automating your tasks with VBA.

But you might be able to use Office Scripts if you are using Excel online with a Microsoft 365 business plan.

This is a new scripting language currently only available for the web version of Excel.

Open your Excel workbook in the browser and go to the Automate tab and select the New Script option.

This will open the Code Editor and you can add your code inside.

function main(workbook: ExcelScript.Workbook) {
  //Get all the sheets in the workbook
  let sheets = workbook.getWorksheets();
  //create an array of borderindex values
  var allBorderIndex = [ExcelScript.BorderIndex.edgeBottom, ExcelScript.BorderIndex.edgeLeft, ExcelScript.BorderIndex.edgeRight, ExcelScript.BorderIndex.edgeTop, ExcelScript.BorderIndex.insideHorizontal, ExcelScript.BorderIndex.insideVertical];
  var arrayLength = allBorderIndex.length;

  //Loop through each sheet
  for (let sheet of sheets) {
    //Loop through each borderindex value
    for (var i = 0; i < arrayLength; i++) {
      //Change border settings for the sheet
      sheet.getRange().getFormat().getRangeBorder(allBorderIndex[i]).setStyle(ExcelScript.BorderLineStyle.continuous);
      sheet.getRange().getFormat().getRangeBorder(allBorderIndex[i]).setColor("FF0000");
      sheet.getRange().getFormat().getRangeBorder(allBorderIndex[i]).setWeight(ExcelScript.BorderWeight.thick);
    }
  }
}

Paste the above code into the editor.

This code will loop through each sheet and change the border style, color, and line weight for the entire sheet. You can customize these formats to your liking.

Press the Run button in the Code Editor and the script will run and change the gridline format accordingly.

Conclusions

Making the gridlines darker is a great way to distinguish between each cell more clearly.

There are several ways to accomplish the task of changing the gridline colors in your Excel sheets.

You will find this setting in the Excel Options menu, but unfortunately, there is no way to change the thickness in these settings.

If you need to change both the color and thickness, then you can use the cell format options.

If you need to update the gridline color across many sheets in your workbook, you can use VBA on the desktop or Office Scripts online to automate this task.

Do you ever change the gridline color in Excel? Let me know in the comments below!

About the Author

John MacDougall

John MacDougall

John is a Microsoft MVP and qualified actuary with over 15 years of experience. He has worked in a variety of industries, including insurance, ad tech, and most recently Power Platform consulting. He is a keen problem solver and has a passion for using technology to make businesses more efficient.

Subscribe

Subscribe for awesome Microsoft Excel videos 😃

John MacDougall

I’m John, and my goal is to help you Excel!

You’ll find a ton of awesome tips, tricks, tutorials, and templates here to help you save time and effort in your work.

Related Posts

Comments

3 Comments

  1. rik manhaeve

    Yes, I found the possiblility in options, however this should be a setting of Excel en go beyond the worksheet or workbook.
    Grey may look cool but is inaccessible. I am a bit older and these grey borders are really a pain in the ass (sorry for me saying so)

    • John MacDougall

      Yes, indeed!

  2. DMF

    I’ve used Excel for decades and don’t understand why more recent versions of Excel have made the gridlines almost invisible. The whole concept of Excel IS the grid, the columns and how the numbers interact based on their location in the matrix. What are the designers thinking? The focus shouldn’t be aesthetics, but functionality…..!!! They obviously aren’t accounting people who need to use Excel for hours everyday. FIX IT….!!!! PLEASE!!! If anyone can escalate this to the design team, that would be great.

Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃