Share via

Expand and collapse columns in Excel

Anonymous
2010-11-30T18:57:42+00:00

Hi,

I have very wide sheet (too many wide columns).

I try to use Excel feature "Expand/Collapse Columns" to hide/display columns. It works, but I want to place label near +/- buttons. Can I do it?

Example:

Column A - CPU

Column B - RAM

Column C - Hard Disk

Column D - Video

I want to group (collapse) columns A-D and see text "Hardware Requirements" near "+" button when the columns are collapsed.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
  1. Anonymous
    2012-06-12T10:32:06+00:00

    Hi, I may have a workaround. 

    I've inserted a blank column before each group of data.  I've labelled the cell in the blank column with a title, colour code and solid black outline (for cosmetics).  Then I've grouped the block of data after this label using the +/- method above.  When clicking the minus to hide the group of data, the + sign defaults to position itself above the previous cell, which happens to be the labels I created.

    Easy solution without using VBA.

    Hope this helps,

    Craig.

    10+ people found this answer helpful.
    0 comments No comments

8 additional answers

Sort by: Most helpful
  1. Anonymous
    2010-12-01T07:02:16+00:00

    In Excel 2007 there is a Grouping capability, I suspect 2010 still has that capability.

    Select the column you wish to collapse then click the Data tab, then > Group > Group...selecting:Columns (you can of course select rows or both if you wish) Then expand or collapse by clicking on the numbers in the top window.

    Hope this will help with your problem.

    20+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2013-05-06T21:28:41+00:00

    I found a trick that makes the labels a little cleaner. 

    Create an extra column AFTER the grouped data, and a top (second) header row. Merge the cells in the header row along with the extra column cell. Enter your label in the merged cell - I like to align the text so that it goes up and takes up less space. (Do not include the extra column in the grouping).

    By doing this, the + icon will be directly over the title, and when the group is expanded, the title displays over the entire section.

    4 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2010-12-01T14:17:27+00:00

    Apologies I clearly did not read your question correctly.

    You can only enter text etc. on the spreadsheet inside the row & column numbering / lettering.

    The best suggestion I can come up with is to hide the Row & Column headers (remove tick in Excel Options > Advanced > Display options for this worksheet) the either type your "Hardware Requirements" label into Cell E1 or alternatively insert a Text Box or Camera Tool function with your label and position immediately under the '+' button, which of course will impinge on cell E1.

    Sorry I can't be more helpful

    0 comments No comments
  4. Anonymous
    2010-12-01T08:13:22+00:00

    I have another problem. I wrote:

    "I try to use Excel feature "Expand/Collapse Columns" to hide/display columns.It works, but I want to place label (text) near +/- buttons. Can I do it?"

    Thanks

    0 comments No comments