+ Reply to Thread
Results 1 to 3 of 3

hide/unhide rows based on cell value

  1. #1
    Registered User
    Join Date
    09-25-2009
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    51

    hide/unhide rows based on cell value

    Hello,

    I have the following situation:
    - a workbook with several sheets.
    - on one of the sheets, in colum "D" i get values form the other sheets.

    I need to make it so that when rows have "-" on colum "D" (from row 10 to 1425) the whole row is hidden. If the value of the cell is changed (in the other sheets so it's no longer "-") it should unhide that row.

    I have found something on google, it works just for the hide part (but it's very slow since I have to check and hide/unhide rows from 10 to 1425).

    Please Login or Register  to view this content.
    Can anyone please help?
    Last edited by alexandruc; 10-12-2009 at 07:13 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: hide/unhide rows based on cell value

    Various options ... if you want to avoid using the Calculate event then you would need to provide more info. with regard to how Col D on this sheet is affected by changes elsewhere. If you rely on the Calculate event then you will need to process all rows with each calculation, however, you can avoid iteration using AutoFilter etc or using temp formulae, an example of the latter

    Please Login or Register  to view this content.
    To insert the above right click on the tab in question select View Code and paste above into resulting window. As and when this sheet is recalculated so the row visibility will update accordingly. Note altering row visibility is volatile hence the toggling of App level settings.
    Last edited by DonkeyOte; 10-12-2009 at 05:50 PM.

  3. #3
    Registered User
    Join Date
    09-25-2009
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: hide/unhide rows based on cell value

    I must admit I don't understand the way the code functions, but it works great!!!

    Thank you very much!!!

+ 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