+ Reply to Thread
Results 1 to 6 of 6

How do I hide rows if a value is typed in a certain cell

Hybrid View

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    Minnneapolis
    MS-Off Ver
    Excel 2010
    Posts
    6

    How do I hide rows if a value is typed in a certain cell

    What I'm looking to do is be able to hide all rows that are not being used. Once the individual is done filling out all fo their information they woudl in theory type an X in the specified cell and that would hide all unused vendor rows.

    I'm working off of the C1 2013 worksheet but would ideally need this to be able to be done on each sheet.

    Thanks,
    Melissa
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: How do I hide rows if a value is typed in a certain cell

    Can you be more specific about which rows would need to be hidden and in which cell the X would go?

  3. #3
    Registered User
    Join Date
    01-04-2013
    Location
    Minnneapolis
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How do I hide rows if a value is typed in a certain cell

    In cell E3 would be where the x would go

    I'm hoping to hide whole sections if blank. Each few rows begins a new section for a new vendor if that whole section is blank I would like to hide it.

    Does that make sense?

    Thanks in advance!
    Melissa

  4. #4
    Registered User
    Join Date
    01-04-2013
    Location
    Minnneapolis
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How do I hide rows if a value is typed in a certain cell

    Does anyone know how to do this?

  5. #5
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: How do I hide rows if a value is typed in a certain cell

    I am sorry I have not been able to help you but when I asked for "specifics" all I got is more vague desciption. I have failed to understand what exactly you want. What you consider a "whole section" and what I consider a "whole section" are probably different. The people on this forum know how to do what you want to do, you just haven't adequately conveyed what you would like accomplished.

    I have created a code with my guess as to what you want done. Odds are it is not right but maybe I got lucky. (Note: Row 132 is an extra row which I deleted prior to running the macro)

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim ws As Worksheet:    Set ws = Sheets("C1 2013")
    
    Application.ScreenUpdating = False
    
    On Error GoTo iEnd
    If Not Intersect(Target, ws.Range("E3")) Is Nothing Then
        If Target.Value = "x" Then
            For icell = 218 To 8 Step -14
                If ws.Range("B" & icell).Value = "" Then
                    ws.Range("B" & icell, "B" & icell + 10).EntireRow.Hidden = True
                End If
            Next icell
        End If
    End If
    
    Application.ScreenUpdating = True
    iEnd:
    End Sub

  6. #6
    Registered User
    Join Date
    01-04-2013
    Location
    Minnneapolis
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: How do I hide rows if a value is typed in a certain cell

    Thanks so much for your help. So very sorry I wasn't more "specific."

    Have a wonderful day

+ 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