ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to easily collapse columns? (https://www.excelbanter.com/excel-discussion-misc-queries/43650-how-easily-collapse-columns.html)

Grd

How to easily collapse columns?
 
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

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.Character s.Text = _
"HIDE"
Else
Columns("c:j").EntireColumn.Hidden = True
ActiveSheet.Shapes("Toggleit").TextFrame.Character s.Text = _
"SHOW"
End If
'can use =not if only ONE change.....
'Columns("g").EntireColumn.Hidden = Not Columns("g").EntireColumn.Hidden
End Sub

--
Don Guillett
SalesAid Software

"Grd" wrote in message
...
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




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

"Grd" wrote:

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


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.
--
Earl Kiosterud
www.smokeylake.com

"Grd" wrote in message
...
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





All times are GMT +1. The time now is 06:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com