Results 1 to 5 of 5

Multiple Macros to hide rows dependent on Yes/No answer on the same sheet

Threaded View

fatbloke83 Multiple Macros to hide rows... 08-22-2012, 04:03 AM
npamcpp Re: Beginner to VBA -... 08-22-2012, 04:07 AM
fatbloke83 Re: Beginner to VBA -... 08-22-2012, 10:23 AM
arlu1201 Re: Beginner to VBA -... 08-22-2012, 04:13 AM
john55 Re: Multiple Macros to hide... 08-22-2012, 10:43 AM
  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    Alrewas, UK
    MS-Off Ver
    Excel 2003
    Posts
    2

    Multiple Macros to hide rows dependent on Yes/No answer on the same sheet

    Hi All,

    First of all thanks for all of the help posted on this forum, normally i can find the answer to my questions without having to post.

    I have a situation where i am using a macro to hide rows dependent on a yes/no answer from a list via validation.

    The formula i found on here is as below and works great:

    Private Sub Worksheet_Change(ByVal Target As Range)
        If Not Intersect(Target, Range("G7")) Is Nothing Then
            If Range("G7").Value = "No" Then
                Rows("94:102").Hidden = True
            Else
                Rows("94:102").Hidden = False
            End If
    End If
    End Sub
    I now need to run the same macro but for several other yes/no cells e.g. G6,G8 and G9 and if they are also "no" responses i need it to hide different rows. I think there will be 6/7 of these formulas in the end.

    I thought i could simply copy the marco again after the first macro but that doesnt seem to work, i am sure i have missed something really obvious here, but would welcome anybodys advice on how to correct this issue.

    Many thanks in advance for your help.
    Last edited by fatbloke83; 08-29-2012 at 07:53 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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