+ Reply to Thread
Results 1 to 4 of 4

Hiding rows/columns on different sheet names

  1. #1
    Registered User
    Join Date
    08-29-2012
    Location
    Scotland
    MS-Off Ver
    Excel 2010
    Posts
    84

    Hiding rows/columns on different sheet names

    Looking for help with adjusting the code below. I've tried the code below but getting a compile error: End With without with?Any suggestions?


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Hiding rows/columns on different sheet names

    You missed end if
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-29-2012
    Location
    Scotland
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: Hiding rows/columns on different sheet names

    This isnt working correctly? It is not hiding the correct columns and rows. Any suggestions. What I'm looking to is:

    If sheet name is "Cover Sheet" then hide rows ("47:63,66:82,85:101,104:120,123:139,142:158,161:177,180:196,199:215,218:234,237:253,256:272,275:291,294:310,313:329,332:348,351:367,370:386,389:405,408:424,427:443,446:462,465:481,484:500,503:519"

    If sheet name "Panel Totals" then hide columns "D:P"

    If the sheet name is not "Cover Sheet" or "Panel Totals" then hide columns "K:S"

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Hiding rows/columns on different sheet names

    Nicola,
    It is working on my test sheet. Okay, I did the following to test it.

    Please Login or Register  to view this content.
    ' By commenting this line, I am testing the rest of the code and the code has hidden the " Panel Totals" and the remaining sheets Range("K:S"). Please note that if the code does not find the first two sheets, ie Cover Sheet and Panel Totals, the code hides all other sheets on that workbook using this line of code

    Please Login or Register  to view this content.
    Last edited by AB33; 10-25-2012 at 07:04 AM.

+ 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