+ Reply to Thread
Results 1 to 3 of 3

Hide row if it's value is del.

  1. #1
    Registered User
    Join Date
    10-05-2012
    Location
    Bulgaria
    MS-Off Ver
    Excel 2007
    Posts
    2

    Hide row if it's value is del.

    Hello,

    I write for the first time in the forum, but I am a regular reader and you helped me a lot.
    Here is my question:
    I have macro that unhide row if the row above is not empty.
    Here it is:

    Private Sub Worksheet_Change(ByVal Target As Range)
    If (Target.Column = 3) Then
    Rows((Target.Row + 1) & ":" & (Target.Row + 1)).Select
    Selection.EntireRow.Hidden = False
    Target.Select
    End If
    End Sub

    But i want the row to hide if i decide to leave it blank.
    for example:

    1. Apple
    2. Orange

    When i del orange i want row to hide.

    I tried a few things but non worked. Any ideas?

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Hide row if it's value is del.

    " if the row above is not empty."

    ambiguous

    let us say you go go to row no;. 5 where do you go to which cell A,B,C, OR D ETC
    assume you meant D5
    so if D4 is not BLANK then you want to hide row no 4
    and then you go to D6
    if D5 is not blank then you hid row no. 5 like that you loop all the rows from row 2 down (row 1 contain column hedings.

    some clairfication with example is required and then copy your macro what you have written.
    it is then possible to modify the macro to suit you.
    I am not an expert. better solutions may be available
    [email protected]

  3. #3
    Registered User
    Join Date
    10-05-2012
    Location
    Bulgaria
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Hide row if it's value is del.

    I suck at explanations
    I have an invoice template where in column C from 15 to 50 are the products that can be choosen from a drop-down menu. C16:49 are hidden by default . C16 unhide if in C15 something is selected... C17 unhide if in C16 something is selected...etc.
    I’m trying to find a macro that.. for example... automatically will hide C18 if I decide to del. the product that’s in that cell.

+ 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