+ Reply to Thread
Results 1 to 3 of 3

Macro to Hide Colums

  1. #1
    keen learner
    Guest

    Macro to Hide Colums

    Hi There fellow community member

    Please Help

    I HAVE A SPREADSHEET WITH ROW AND COLUMN HEADERS WHICH IS UPDATED EVERY
    MONTH. i NEED TO CREATE A MACRO THAT WILL HIDE AND UNHIDE COLUMNS TO ENABLE
    ME TO VIEW 6 AND 12 MONTHS DATA ALTERNATIVELY.

    What I need for the macro to do is the following
    1) Go to row 6 (where my data starts)
    2)from row 6 search and identify by column the last column that contains
    data(as every month i add a new column.
    3)Offset the last column(iLastCol) by 6
    4)Hide columns from column b to iLastCol-6 (Column A contains the Row headers)

  2. #2
    Bob Phillips
    Guest

    Re: Macro to Hide Colums

    Don't open another thread, the other is still active.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "keen learner" <[email protected]> wrote in message
    news:[email protected]...
    > Hi There fellow community member
    >
    > Please Help
    >
    > I HAVE A SPREADSHEET WITH ROW AND COLUMN HEADERS WHICH IS UPDATED EVERY
    > MONTH. i NEED TO CREATE A MACRO THAT WILL HIDE AND UNHIDE COLUMNS TO

    ENABLE
    > ME TO VIEW 6 AND 12 MONTHS DATA ALTERNATIVELY.
    >
    > What I need for the macro to do is the following
    > 1) Go to row 6 (where my data starts)
    > 2)from row 6 search and identify by column the last column that contains
    > data(as every month i add a new column.
    > 3)Offset the last column(iLastCol) by 6
    > 4)Hide columns from column b to iLastCol-6 (Column A contains the Row

    headers)



  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,483
    I was doing a very quick search and found nothing, but as I read your thread I was thinking about "joining" groups
    Highlite the columns you want to hide and goto
    Data=>Group and Outline=>and select group
    Now there will be a "-" sign above your columns click on the minus sign and the group will hide, there are also numbers at the side of the column you can click to hide columns, this also works for rows,
    you can have many grouped columns and rows.

    If you don't like using the groups method, you can always try your macro recorder , like end,=> takes you to the last cell with data in a row ....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1