+ Reply to Thread
Results 1 to 5 of 5

Hide/unhide cells depending on independent cell value

  1. #1
    Forum Contributor
    Join Date
    09-11-2012
    Location
    minot, north dakota
    MS-Off Ver
    Excel 2010
    Posts
    118

    Post Hide/unhide cells depending on independent cell value

    I need help creating a macro that will unhide rows depending on the # of substances that are selected from the drop down menu.
    Cell D90 will contain the drop down menu containing 0, 1, 2, 3, 4, and 5
    If 0 is selected then rows 91-100 are hidden
    If 1 is selected then rows 93-100 are hidden and 91-92 are unhidden
    If 2 is selected then rows 95-100 are hidden and 93-94 are unhidden
    If 3 is selected then rows 97-100 are hidden and 95-96 are unhidden
    If 4 is selected then rows 99-100 are hidden and 97-98 are unhidden
    If 5 is selected all rows are unhidden
    There are several tabs in the file and the tab that i want the macro for is the report tab
    thanks for any help that is rendered
    Using Excel 2010

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    817

    Re: Hide/unhide cells depending on independent cell value

    Hi Aaron,

    Something like?
    Please Login or Register  to view this content.
    Kind regards, Harry.

  3. #3
    Forum Contributor
    Join Date
    09-11-2012
    Location
    minot, north dakota
    MS-Off Ver
    Excel 2010
    Posts
    118

    Re: Hide/unhide cells depending on independent cell value

    So
    I need to record a macro then stop recording
    Edit macro, delete everything and copy and paste above macro?
    It heeps giving me an error

  4. #4
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    817

    Re: Hide/unhide cells depending on independent cell value

    No Aaron.

    Press Alt+F11.
    To the left you will see the sheetnames.
    Dubbelclick on the sheetname that is the rigth one for you.
    Copy the code of the forum to the large white plane.
    Close Vba with Alt+F11 or the red cross.
    Change cell D90.

  5. #5
    Forum Contributor
    Join Date
    09-11-2012
    Location
    minot, north dakota
    MS-Off Ver
    Excel 2010
    Posts
    118

    Re: Hide/unhide cells depending on independent cell value

    That is perfect thanks I appreciate all the help.
    I hope you have a Happy New Year

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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