How to easily collapse columns?

G

Grd

Hi,

Is there a way to hide and unhide columns easily without using the menus. I
have a large spreadsheet and I would like to navigate it more easily.

Any help appreciated

Thanks

G
 
D

Don Guillett

you might adapt this to your needs. You need to create a button and name it
"toggleit"

Sub HideG_UnhideG()
If Columns("c:j").EntireColumn.Hidden = True Then
Columns("c:j").EntireColumn.Hidden = False
ActiveSheet.Shapes("toggleit").TextFrame.Characters.Text = _
"HIDE"
Else
Columns("c:j").EntireColumn.Hidden = True
ActiveSheet.Shapes("Toggleit").TextFrame.Characters.Text = _
"SHOW"
End If
'can use =not if only ONE change.....
'Columns("g").EntireColumn.Hidden = Not Columns("g").EntireColumn.Hidden
End Sub
 
D

Duke Carey

You can select the columns to hide and press Ctrl-0 (that's a zero)

You can unhide by selecting the 2 columns that flank the hidden columns and
pressing Ctrl-Shift-0 (also a zero)

Alternatively, if it's always the same columns you want to hide, you can
select the columns and then use Data->Group and Outline to group them.
You'll see a new bad above your column headers with a button labeled with a
minus sign. Clicking the button will hide the columns & change the button to
a plus sign. Click it again and the columns are displayed
 
E

Earl Kiosterud

G,

You may be able to use Excel's grouping. Then you can collapse (hide) a
column, or group of columns. Select a group of columns you'll want to
group. Data - Group and Outline - Group. Now the familiar outline symbol
will appear at the top, with buttons to collapse or expand the columns. A
group can't be immediately adjacent to, or very near another group.
 
Top