+ Reply to Thread
Results 1 to 3 of 3

To hide/unhide rows based on specific value in a cell.

  1. #1
    Registered User
    Join Date
    11-05-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    15

    To hide/unhide rows based on specific value in a cell.

    Hi All,

    I want to create a macro which will basically refer say Cell E5 for value say A and keep 4,5 & 6 rows unhidden & hide rows 7,8,9 and rows 12,13,14. Incase the value is B then it should hide 4,5,6 & 12,13,14 hidden and keep 7,8,9 unhidden. Incase of value C then it should hide 7,8,9 and 4,5,6 hidden and 12,13,14 unhidden.

    I have attached a sample sheet for reference.

    any help would be highly appreciated,

    Thanks
    @Jerry
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: To hide/unhide rows based on specific value in a cell.

    Please Login or Register  to view this content.
    ?

  3. #3
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: To hide/unhide rows based on specific value in a cell.

    @jerry:
    It is funny that the cells that you described as the focal cell i.e. E5 is actually not the focal cell in your spreadsheet. I opened your spreadsheet and the focal cell is actually E3, and the conditions that you specified for hidden and unhidden are different for the conditions that you specified in the spreadsheet. Hence I will proceed with the conditions that you specified in the spreadsheet to hide and unhide rows.
    Also note that I have re-routed the link for your “data validation” cells (E3) to include a blank cell. With a blank cell selected, all row will be visible, until you select either A, B or C.
    I have attached a spreadsheet here with the code. I will also paste the code below for you. You can modify and change the rows depending on your preference.

    Please Login or Register  to view this content.
    If you find this helpful don’t forget to mark your thread as solved and also add a reputation to the person that helped you.
    Cheers
    Attached Files Attached Files
    Last edited by vnzerem; 01-28-2014 at 12:01 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] First unhide all rows - then hide rows based on specific cell value for a range of cells
    By robbiekh in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-22-2013, 05:46 PM
  2. Auto Hide And Unhide Row Based On Empty Cell In Specific Range
    By jackgan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2013, 09:18 AM
  3. [SOLVED] VBA for hide/unhide specific rows automatic if certain cell value is more then pre define
    By santosh226001 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-05-2013, 08:58 AM
  4. Hide/Unhide rows based on cell value in each row
    By Drewf2000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2013, 07:11 AM
  5. Hide/Unhide Rows Based On Cell Value
    By ZooTV92 in forum Excel General
    Replies: 5
    Last Post: 09-05-2011, 07:51 AM

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