Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SelectionChangeEvent (I think) (E2000)

    Hi all,

    Have been pondering on this for some time. How would you go about unhiding the row below where you are entering a value in a cell?

    What I have is a spreadsheet that has 20 or so account categories such as food, paper, cleaning, etc. Currently, each category has a set number of rows containing information such a date, vendor, invoice number and amount which are always displayed. The number of rows per category vary according to the maximum number of entries that might be needed for that category. This is fine except that when printing the sheet and viewing the sheet there are many blank rows printed, and the user must also scroll through many blank rows to get to the needed category.

    What I would like to do is hide all the rows for each category except for one. When a value is entered in that row, unhide the next row. I know this is possible, but how?

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SelectionChangeEvent (I think) (E2000)

    Hi Michael,

    This unhides the next row when data is entered into column A:

    <pre>Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, ActiveSheet.[A:A]) Is Nothing Then Exit Sub
    Target.Offset(1, 0).EntireRow.Hidden = False
    End Sub
    </pre>

    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SelectionChangeEvent (I think) (E2000)

    Many thanks Jan...that works wonderfully.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •