+ Reply to Thread
Results 1 to 5 of 5

Hide Rows based on dropdown selection...

  1. #1
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Hide Rows based on dropdown selection...

    Greetings, Gurus.

    I have a worksheet on which the user would have to make 2 different selections from a dropdown listbox. Box 1's cell link is M2, and the user can select from 3 cases, (empty, "New" or 'Recycled"). Box 2 is linked to cell S2, and the user can select from 3 cases, (empty, "US" or "Canada").

    I would like to automatically hide certain rows based on the selections. If the boxes are empty, (showing "1" in the associated linked cell), then I want all rows visible. If "New" is selected in Box 1, (the value in M2 would be "2"), I want to hide rows 8, 10, 15 and 17. If "Recycled" is selected, (the value in M2 would be "3"), I want to hide rows 14, 16, 20 and 22.

    Ideally, these rows would hide automatically when the selections are made, without having to push another button. I don't know if the code would be entered into a regular module, or the sheet itself.

    Any suggestions would be much appreciated.

    Hutch

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Hutch,

    Are you using a Validation drop down or a Forms tool bar Drop Down?

    Sincerely,
    Leith Ross

  3. #3
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Whassup, Leith?

    How's it goin, Leith.

    I am using a forms toolbar dropdown. Since there is a value assigned to the linked cell, this would be the same as hiding the rows based on cell value. Correct?

    Thanks for the response.

    Hutch
    Last edited by [email protected]; 06-27-2008 at 03:06 PM.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Hutch,

    Sorry about the delay. The phone always seems to ring whenever I am coding. Copy this code to a Standard module and then attach the macro to your first drop down. This code doesn't look at the second drop down's selection to unhide the rows. That can be changed easy enough.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  5. #5
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Works great!

    That works beautifully, Leith. I think I can figure it out from here, but if not, I'll be back in touch.

    Thanks again!

    Hutch

+ 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