+ Reply to Thread
Results 1 to 5 of 5

Hide a row based on a drop down menu selection

  1. #1
    Registered User
    Join Date
    06-19-2012
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    7

    Question Hide a row based on a drop down menu selection

    Hi,

    I am trying to get a single row; row 20, to either hide or unhide depending on what is selected from a drop down menu. The drop down menu is located in a merged cell; P10:R10. The drop down menu only has two options; "Horizontal" or "Vertical". I want to get row 20 to hide when "Horizontal" is selected and then to unhide when "Vertical" is selected.

    I have been trying all day with various macros and formulas out there but with no luck . My knowledge of VB is basic.

    Thanks

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Hide a row based on a drop down menu selection

    Please Login or Register  to view this content.
    Code goes into the worksheet module.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Registered User
    Join Date
    06-19-2012
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    7

    Unhappy Re: Hide a row based on a drop down menu selection

    Thank you for getting back to me, however, I have entered that as a new module but nothing happens. I have tried restarting the spread sheet and re-doing the module again but no luck.

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Hide a row based on a drop down menu selection

    The code must go into the worksheet module -- *NOT* a standard module.
    Right-click the worksheet tab > view Code > Paste the code in.

    You must save the workbook as a macro-enabled (.xlsm) type and enable the macros when prompted upon opening the workbook.

  5. #5
    Registered User
    Join Date
    06-19-2012
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    7

    Re: Hide a row based on a drop down menu selection

    BRILLIANT that's worked now thank you!!
    Apologies for the earlier confusion.

+ 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