Results 1 to 11 of 11

Hide, Unhide Rows and count!?

Threaded View

  1. #1
    Registered User
    Join Date
    01-13-2009
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2003
    Posts
    52

    Hide, Unhide Rows and count!?

    I'm stumbling on something that possibly quite simple.

    I have a code that will hide all rows that have a "-" in Colum A, leaving me with the useful data.

    However, this data is pulled from a front sheet that has data added to it.

    What I would like my code to do is to relook at all the hidden cells, and if their value has changed from "-" to what ever the data may be then to unhide that row, displaying the data.

    The code I'm using currently is:
    Sub HideRows()
    Dim cell As Range
    For Each cell In Range("4:2500")
    If (cell.Value) = "-" Then
    cell.EntireRow.Hidden = True
    End If
    Next
    End Sub
    What I would also like to achieve is a simple way to then count the amount of rows with data in them and display that figure in Cell D2 for example. So that I know at a glance how many clients I have in that list once compacted.

    Any ideas?

    Thanks
    Last edited by wjsok85; 04-05-2009 at 10:30 AM. Reason: Solved

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