+ Reply to Thread
Results 1 to 5 of 5

Help! Hiding rows in sheet2 based on values in sheet1

  1. #1
    Registered User
    Join Date
    08-22-2011
    Location
    wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    3

    Help! Hiding rows in sheet2 based on values in sheet1

    Hello everyone. I'm new to vba and am looking for some guidance. I am using excel2003. Here's my problem...
    sheet1 cells a1 to a10 contain a list of parts to be built. sheet1 cells b1 to b10 each contain a drop down list limiting values to "yes" or "no".

    If sheet1 b1 is "no", sheet2 row 1 should be hidden, if sheet1 b1 is "yes" sheet2 row1 should be visible.
    If sheet1 b2 is "no", sheet2 row 2 should be hidden, if sheet1 b1 is "yes" sheet2 row2 should be visible, etc.. all the way through b10.

    Any help anyone can give would be greatly appreciated.
    Last edited by Oti; 08-23-2011 at 12:22 PM.

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Help! Hiding rows in sheet2 based on values in sheet1

    Try this:
    Please Login or Register  to view this content.
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Registered User
    Join Date
    08-22-2011
    Location
    wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Help! Hiding rows in sheet2 based on values in sheet1

    Thanks for the quick reply Thomas. I tried to put in the code you supplied with no results.

    edit:
    OK i got it to work, but only after manually running the macro.

    Is there a way for this to update automatically when switching from sheet1 to sheet2?
    Last edited by Oti; 08-22-2011 at 11:56 PM.

  4. #4
    Registered User
    Join Date
    08-22-2011
    Location
    wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Help! Hiding rows in sheet2 based on values in sheet1

    After some additions to the worksheets, I need to hide different cells on sheet2 now. "no" in sheet1 B1 now needs to hide rows 16 and 17 on sheet2. "no" in sheet1 B5 needs to hide rows 18-20 on sheet2., etc. What is the proper way to do this?

  5. #5
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Help! Hiding rows in sheet2 based on values in sheet1

    Is there some kind of pattern to how the rows are to be hidden? There doesn't seem to be from what you describe, so I need more information and it would be good to attach a sample workbook. Click Go Advanced when replying, then click the paper clip icon to attach your workbook. Please take time to provide a full description of how you want to apply all scenarios for which you want to hide rows and describe what your workflow will look like.

    It can certainly be automated, but I'm not sure that's the best approach. I need some data first.

+ 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