How to remove gridlines for all but work area

gijeet

New Member
Joined
May 20, 2015
Messages
2
Hello, I see lots of worksheets where only the work area has gridlines, the rest of the worksheet is all white - not grayed out. This focuses your attention to the work area. How to accomplish this? Thanks!

G
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
If you see that, it's borders. The native gridlines are either on or off. You could turn them off and put light gray borders on your work area, I suppose.
 
Upvote 0
The way I do it.

Turn off the gridlines for the whole sheet—on the ribbon's View tab, in the Show section, uncheck the Gridlines checkbox. I do this often so I added the command "View Gridlines" to the Quick Access Toolbar.

For the sections where I want to display gridlines, I set the cell borders to a light gray. The default Excel gridline color is R = 212, G = 212, B = 212.

In my PERSONAL.xlsb I have this macro:
Code:
Sub SetGrayBordersAll()
' Formats the selected cells with light gray borders.
' Keyboard Shortcut: Ctrl+Shift+G
''''
    If TypeName(Selection) <> "Range" Then Exit Sub
    Const MYCOLOR As Long = 13948116    ' RGB(212, 212, 212)
    Selection.Borders.Color = MYCOLOR
End Sub
I've set the keyboard shortcut and it adds the light gray border to all the selected cells when I press Ctrl+Shift+G.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,876
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top