M Mary Contrary Jan 22, 2010 #1 How to insert button on spreadsheet to quickly hide & unhide a group of columns
D Don Guillett Jan 22, 2010 #2 Sub togglehidecols() Columns(2).Resize(, 4).Hidden = _ Not Columns(2).Resize(, 4).Hidden End Sub
G Gord Dibben Jan 22, 2010 #3 Add a button from the Forms Toolbar and assign this macro. Sub toggle_columns() Dim rng As Range Set rng = Columns("D:I") If rng.Hidden = True Then rng.Hidden = False Else rng.Hidden = True End If End Sub Note: Excel also has the "Custom Views" feature which requires no macro. Simply switch from one View to the other. Gord Dibben MS Excel MVP On Fri, 22 Jan 2010 13:07:01 -0800, Mary Contrary <Mary
Add a button from the Forms Toolbar and assign this macro. Sub toggle_columns() Dim rng As Range Set rng = Columns("D:I") If rng.Hidden = True Then rng.Hidden = False Else rng.Hidden = True End If End Sub Note: Excel also has the "Custom Views" feature which requires no macro. Simply switch from one View to the other. Gord Dibben MS Excel MVP On Fri, 22 Jan 2010 13:07:01 -0800, Mary Contrary <Mary
C CellShocked Jan 23, 2010 #6 Is that a special application assistant's function? darn<> dang<> dagnabbit<> crikey<> beatmetoit<>
G Gord Dibben Jan 23, 2010 #7 Was supposed to be Oh, darn<g> meaning.............why didn't I think of that? Gord
C CellShocked Jan 23, 2010 #8 Was supposed to be Oh, darn<g> meaning.............why didn't I think of that? Gord Click to expand...
Was supposed to be Oh, darn<g> meaning.............why didn't I think of that? Gord Click to expand...