[excel-2007] Reset Excel to default borders

Ok, so you know what a spreadsheet looks like when you open a new on in Excel; the borders are a light blue. These are only on the screen though, if you print the sheet it will not have borders. Say you've applied some various formatting to the sheet (background color, etc.) and those "default" borders are gone. My question is how to you get them back? Simply doing a Clear Formats will not always work.

Specifically I am talking about Excel 2007 but I believe all versions do this.

Any ideas?

Thanks, Ryan

This question is related to excel-2007

The answer is


My best answer for this is to simply use format painter. This might be a bit of a pain, but it works rather well as the problem you are facing is that Gridlines are covered by fill and other effects that are layered on top. Imagine putting a piece of white paper on top of your grid, the grid lines are present underneath, but they just don't show.

So try:

  1. Clicking on a cell in the spreadsheet with the format that you want
  2. Under the ribons, go to Home and format painter, it should be a smaller icon near the paste button.
  3. Now highlight any cell that you want to apply this format to and it will set the font, color, background etc. to the same as the cell selected. The value will be preserved.

From my experience this is the easiest way to do this quickly. Especially when pasting things in and out of excel.

Again this is not the programmatic way of solving this problem.


I was having the same trouble with importing from Excel 2010 to Access, appending an "identical" table. Early on in the wizard it said not all my column names were valid, even though I checked them. It turns out that it saw an "empty" column with no column name. When I tried using the import wizard to create a new table instead, it worked. However, I noticed that it had added a blank column to the right of my data and called it "Field30". So I went back to the spreadsheet I was trying to import, selected the columns to the right of the data that I wanted, right-clicked and chose "clear contents." That did the trick and I was able to import the spreadsheet, appending it to my table.


In case anyone still needs the VBA way of doing this:

The properties, assuming you selected something, are:

With Selection
    .interior.pattern = xlNone
    .Borders(xl<side>).Linestyle = xlNone
End Selection

Where <side> can be for example DiagonalDown or EdgeTop, so

-> Selection.Borders(xlEdgeTop).Linestyle = xlNone

would reset the Top Edge.


Another way, There is check box Page Layout tab with Gridlines [ ] View which should be checked.

Page Layout Tab


I had this issue, grid lines appeared to be missing on some cells.

Took me awhile to figure out that the color of those cells were white. I clicked format cell, pattern and then selected "no color" (instead of white) The the grid lines were visible again.

I hope this helps others as it took me a while to figure out why.


I understand this is an old post. But it is programmable. Otherwise make sure your fill is set to "No Fill" and your boarders are set to "No Boarder" via the user interface shown in the previous posts.

Sub clear()
Range("A4:G1000").Borders.LineStyle = xlNone 
Range("A4:G1000").Interior.ColorIndex = xlNone 
End Sub()

you just need to change the line color and you can apply it without problem

enter image description here


Just go to Home> Cell Style > Normal

khir


In Excel 2016 for Mac, I clicked the Excel menu, then clicked Preferences…

I then clicked the View icon.

whereupon I found a Gridlines Checkbox next to a Color Picker.

Regardless of whether the Gridlines checkbox os checked or not, if you change the color in the Color Picker dropdown menu, your cell borders will become that color. (I believe the change took place after i quit excel and opened the document the next day to continue working on it but I can't accurately remember.)

Changing the color picker back to Automatic will return your cell borders to the default (black) color on-the-fly.

N.B. Because I'm a newbie I cannot insert the screen shots I prepared ahead of time.


If you have applied border and/or fill on a cell, you need to clear both to go back to the default borders.

You may apply 'None' as the border option and expect the default borders to show, but it will not when the cell fill is white. It's not immediately obvious that it has a white fill, as unfilled cells are also white.

In this case, apply a 'No Fill' on the cells, and you will get the default borders back.

Screenshot of Excel indicating locations of No Border and No Fill options

That's it. No messy format painting, no 'Clear Formats', none of those destructive methods. Easy, quick and painless.