+ Reply to Thread
Results 1 to 5 of 5

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

  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:

    Please Login or Register  to view this content.
    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.

  2. #2
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: Beginner to VBA - Multiple Macros

    Please wrap your code in code tags.

    Try

    Please Login or Register  to view this content.
    Like a post? Click the star below it!

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Beginner to VBA - Multiple Macros

    Fatbloke83,

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature.
    Last edited by arlu1201; 08-22-2012 at 02:02 PM.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    08-17-2012
    Location
    Alrewas, UK
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Beginner to VBA - Multiple Macros

    Thanks Npamcpp, but that isnt quite what i am looking to acheive, apologies i dont think i have explain myself very well. I need the following to be accomplished:

    If G5 = "No" hide rows 56:61
    If G6 = "No" hide rows 63:71
    If G7 = "No" hide rows 94:102
    If G8 = "No" hide rows 104:109
    If G9 = "No" hide rows 73:92

    All of the above need to work independent of each other as there can be numerous combinations of yes/no.

    Thanks again for your prompt response those, and apologies for the lack of code wraps.

    Cheers

    Mark

  5. #5
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

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

    try this
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

+ Reply to Thread

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