Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

We have an Excel spreadsheet with a secured/protected sheet. Only a small number of cells are open for editing. Now that it is protected, we cannot expand or collapse the columns in that sheet anymore.

Is there a way to do this, or can't this be done at all?

share|improve this question
    
Can you add details about which version of Microsoft Excel you are using please. –  Nick Josevski Jul 12 '11 at 8:07
    
@Nick Josevski : done, being busy with 2010 all this time makes me forget not everyone uses it –  Djerry Jul 12 '11 at 8:35

1 Answer 1

up vote 0 down vote accepted

According to this post on Microsoft Answers, you cannot expand or collapse grouped columns in a protected sheet.

It is possible to write a macro to show or hide the columns, rather than using grouping to do it, and then attaching the macro to a button on the sheet, as in the suggestion from that site:

Sub HideorUnhideColumns()
Sheets("Sheet1").Activate
If Columns("A:D").EntireColumn.Hidden = True Then
   Columns("A:D").EntireColumn.Hidden = False
Else
   Columns("A:D").EntireColumn.Hidden = True
End If
End Sub
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.