+ Reply to Thread
Results 1 to 9 of 9

Multiple "Worksheet Change" Instructions

  1. #1
    Registered User
    Join Date
    06-16-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    6

    Question Multiple "Worksheet Change" Instructions

    Hi all. Very new to VBA but I'm hoping someone can help me out here because I've got stuck...

    I want to automatically hide columns based on the contents of a drop down list and then automatically hide rows based on the same criteria. I've worked out how to do either one on its own but can't seem to combine the 2 without error. I've pasted the code I'm using below. Each section (that starts "Private Sub Worksheet...") works on its own but not when I try do both at the same time (as below). B2 hold the contents of a drop down list.

    Any help would be much appreciated!

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    08-01-2013
    Location
    Verona - Italy
    MS-Off Ver
    Excel 2007-2010-2013
    Posts
    33

    Re: Multiple "Worksheet Change" Instructions

    What about trying to write a unique macro working on columns and rows to hide at the same time?

  3. #3
    Registered User
    Join Date
    06-16-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    6

    Re: Multiple "Worksheet Change" Instructions

    Thanks, but not sure what you mean???

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Multiple "Worksheet Change" Instructions

    Something like this:

    Please Login or Register  to view this content.
    Rory

  5. #5
    Registered User
    Join Date
    06-16-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    6

    Re: Multiple "Worksheet Change" Instructions

    Awesome, thanks Rorya.

    Is there a way to amend it so that when I select "All" in the B2 drop down list that columns and rows get UN hidden?

  6. #6
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Multiple "Worksheet Change" Instructions

    Try this:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-01-2013
    Location
    Verona - Italy
    MS-Off Ver
    Excel 2007-2010-2013
    Posts
    33

    Re: Multiple "Worksheet Change" Instructions

    I meant exactly what rorya has written

  8. #8
    Registered User
    Join Date
    06-16-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    6

    Re: Multiple "Worksheet Change" Instructions

    Perfect - thanks guys.

  9. #9
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Multiple "Worksheet Change" Instructions

    Glad to help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 07-24-2017, 02:19 AM
  2. "Worksheet change" not changing cell on other sheet to match target cell "fill".
    By Ochimus in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-02-2015, 12:02 PM
  3. [SOLVED] Multiple Worksheet Change events??? "macro" needed to hide/unhide rows multiple instances
    By dgibney in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-02-2014, 03:40 PM
  4. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  5. Change "Parent" cell based on results of multiple "Children" cells
    By ccowman in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 12-14-2012, 02:33 AM
  6. [SOLVED] I am unable to "print screen" flollowing the instructions in HELP
    By aneruth in forum Excel General
    Replies: 1
    Last Post: 07-25-2006, 11:50 AM
  7. Would like to change all "yes" cells in a worksheet with "logged"
    By Kezza in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-10-2006, 09:20 AM

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