Results 1 to 3 of 3

hide/unhide rows based on cell value

Threaded View

alexandruc hide/unhide rows based on... 10-12-2009, 03:24 AM
DonkeyOte Re: hide/unhide rows based on... 10-12-2009, 03:37 AM
alexandruc Re: hide/unhide rows based on... 10-12-2009, 06:49 AM
  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).

    Sub Hide_Rows()
       
        Sheets("Justificare").Select
        Cells.Select
        Selection.EntireRow.Hidden = False
         
        Dim i As Integer
        For i = 10 To 1425
            If Range("D" & i).Value = "-" Then
                Rows(i & ":" & i).EntireRow.Hidden = True
            End If
        Next i
         
    End Sub
    Can anyone please help?
    Last edited by alexandruc; 10-12-2009 at 07:13 AM.

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