+ Reply to Thread
Results 1 to 4 of 4

Hide and Unhiding Columns

  1. #1
    Registered User
    Join Date
    03-22-2008
    Posts
    15

    Unhappy Hide and Unhiding Columns

    I've been scrathching my head over this, but for the gurus, this is probably simple.

    I've got a weekly file that I update. There are two summary columns that are all the way to the right of the Excel worksheet, and they are the last two columns that an Excel sheet can hold (Columns IU and IV, I believe) . I unhide all available data and hide any columns which have not yet populated data that are blank.
    For example, this week I uploaded data into Column C. I need to have Columns D:IT hidden, and leave the last two summary Columns exposed.

    I have not been succesful automating hiding and unhiding the columns, since every week the range of columns that I need to select to hide/unhide will change. Does any one have advice on how I should accomplish this?

    If I haven't explained this well. let me know.
    Thank you experts!

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why not have the summary on a separate sheet?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Quote Originally Posted by papastyle3
    I've been scrathching my head over this, but for the gurus, this is probably simple.

    I've got a weekly file that I update. There are two summary columns that are all the way to the right of the Excel worksheet, and they are the last two columns that an Excel sheet can hold (Columns IU and IV, I believe) . I unhide all available data and hide any columns which have not yet populated data that are blank.
    For example, this week I uploaded data into Column C. I need to have Columns D:IT hidden, and leave the last two summary Columns exposed.

    I have not been succesful automating hiding and unhiding the columns, since every week the range of columns that I need to select to hide/unhide will change. Does any one have advice on how I should accomplish this?

    If I haven't explained this well. let me know.
    Thank you experts!
    Hi,

    One solution is to use the following VBA code:

    Please Login or Register  to view this content.
    This will allow you to choose whether to hide or unhide columns. Note that it checks rows 1:100 in clumns A:IV. Change the rows if appropriate.

    One suggestion. Why have a total column as the last column. I always find it's better to have a total column as the first column, and indeed a total row as the first row. This means that they always stay in the same position irrespective of how much data you have. If you do this you could no doubt save a bit of time by only checking say columns A:Z in the macro.

    HTH

  4. #4
    Registered User
    Join Date
    03-22-2008
    Posts
    15

    Thanks

    Thank you, I will see if it works, but it looks like it would solve it.
    I agree with you about having a total column in the beginning. I inherited the worksheet, so I could make changes to it. I'll let you know how it works. THANKS!

+ 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