+ Reply to Thread
Results 1 to 5 of 5

Macro Filter to hide rows based on Drop Down List

  1. #1
    Registered User
    Join Date
    09-23-2010
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    35

    Macro Filter to hide rows based on Drop Down List

    I am trying to create a macro that will auto filter but nicer. Based on a specific cell drop down list (cell H4). But there are headings that I do not want hidden no matter the value i nthe drop down list. My code is below:
    Please Login or Register  to view this content.
    I am getting an object error. My logic is that first the macro will hide all non-heading lines, as they don't have anything in column B, then unhide all the rows where the column D valuse match cell H4. Can this work this way? I can post the excel if necessary. Thanks

  2. #2
    Registered User
    Join Date
    09-23-2010
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Macro Filter to hide rows based on Drop Down List

    Any ideas on this. Any other ways to do this? Thanks.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro Filter to hide rows based on Drop Down List

    It will be good if you post a sample file.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    09-23-2010
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Macro Filter to hide rows based on Drop Down List

    Attached is an example of what I want to filter. There is the drop down list towards the top that I want to trigger the action, but I can add that later. I would just like to be able to have someone change that cell, then all of the other tasks without there name are hidden, leaving their tasks and all of the project headers.

  5. #5
    Registered User
    Join Date
    09-23-2010
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Macro Filter to hide rows based on Drop Down List

    Well, after I posted the example, I solved it. Basically I created formulas in one column to change corresponding to a designated cell in that row. So when the two match, the forumla = 1, when they dont, = 2, and when the drop down list is blank, everything ='s 3. Then I set the macro to run when the drop down list is changed. Macro is the following:
    Please Login or Register  to view this content.
    it is pretty simple, and kind of slow, but this excel is for project management, and right now the projects should not be getting to 1,000 tasks. Either way it works for now and this is SOLVED!

+ 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