+ Reply to Thread
Results 1 to 2 of 2

Hide rows based on multiple ranges not containing certain value of referenced cell

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    chicago
    MS-Off Ver
    Excel 2003
    Posts
    2

    Hide rows based on multiple ranges not containing certain value of referenced cell

    Good morning all,
    I'm too new to VBA to figure out how to tackle this scenario. What I'm trying to do is create a tool that will let me select an all individuals or one just one person via a drop down and then automatically hide any rows in three specified ranges that do not contain their initials.

    In the attached excel file I've set it up so that I have the drop down in the top left of sheet 1 which is adjacent to a cell that looks up the personnel's initials. I have three named ranges, D3:AL10, D12:AL16, D18,AL22, that I would like to evaluate for that person's initials. If a row in that range does not contain their initials then I would like them hidden. If "Show All" is selected resulting in "All" displaying in B2, I would like all rows to be shown.

    Any help would be appreciated.
    Thanks!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-11-2013
    Location
    chicago
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Hide rows based on multiple ranges not containing certain value of referenced cell

    As I continue to struggle with this issue, I've written a narrative of how I'm envisioning the code to function.

    If the value of B2 is changed then do the following steps
    If cell.value B2 = "All" then all rows in range1, range2 and range3 will be shown (entire.row hidden=false)
    Elseif the the rows of range1, range2 and range3 (as in only evaluate columns D:AL) do not have a cell value that matches B2 then hide that row (entire.row hidden=true)

    So when J. Beam is selected from the dropdown, cell B2 become "JB." I would want the script to kick in resulting in row 10, 12, 14-16, 18, 20-21 to hiding.

    Thanks in advance for the help.

+ 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