+ Reply to Thread
Results 1 to 3 of 3

Multiple Worksheet_Change macros in one worksheet

  1. #1
    Registered User
    Join Date
    08-30-2017
    Location
    AUSTRALIA
    MS-Off Ver
    2010
    Posts
    2

    Multiple Worksheet_Change macros in one worksheet

    Hi excel gurus

    Requesting your help

    I need a code automatically to hide rows in the range 97:110 when the cell value in A6 is selected BB or FFF or MM or PP and automatically to unhide the rows when the data in A6 is other than BB or FFF or MM or PP .

    The second code I need is to automatically hide rows in the range 47:75 when the cell value in A6 is selected LL or FFF or NN or SS and automatically to unhide the rows when the data in A6 is other than LL or FFF or NN or SS.

    Please note on both occasions we have FFF which required to hide different rows that means when I select FFF, I need to hide both rows range 47:75 and also 97:110

    I think the workbook is the 2016 version but I want the code for the 2010 version.(I use 2016 at my home and when I saved the 2010 work version in my home computer, it automatically saved as 2016)


    Thanks guys
    Last edited by mallan; 08-30-2017 at 04:26 PM.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Multiple Worksheet_Change macros in one worksheet

    There are no code changes between 2010 and 2016, or workbook differences. There are different functions and utilities available, but that doesn't affect the workbook necessarily.

    Your code does what you want (though for different values) - I would just check the cell being changed first to prevent it from being run every time something changes:

    Please Login or Register  to view this content.
    If you really want to do it for BB or FFF or MM or PP / LL or FFF or NN or SS then just change to those values:

    Please Login or Register  to view this content.
    Last edited by Bernie Deitrick; 08-30-2017 at 09:40 AM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    08-30-2017
    Location
    AUSTRALIA
    MS-Off Ver
    2010
    Posts
    2

    Re: Multiple Worksheet_Change macros in one worksheet

    Thanks heaps Bernie

    Its working

+ 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. VBA: Multiple Worksheet_Change Macros + COUNTIF
    By hysterical.useless in forum Excel Programming / VBA / Macros
    Replies: 36
    Last Post: 05-26-2017, 06:48 PM
  2. [SOLVED] Combining 2 Private Sub Worksheet_Change macros
    By OscarTheG in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-06-2017, 12:42 PM
  3. [SOLVED] Multiple Worksheet_Change macros?
    By gvglandsurveyors in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-26-2016, 09:31 AM
  4. [SOLVED] Help with combining two worksheet_change macros
    By goatie43 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-27-2015, 09:07 PM
  5. [SOLVED] Combine two Worksheet_Change macros
    By moongazer208 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-11-2013, 06:14 AM
  6. Combine 2 worksheet_change event macros
    By RebelVampire in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2013, 12:37 AM
  7. Using Worksheet_Change to initiate Macros
    By Jimbo42 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-05-2013, 07:30 PM

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