+ Reply to Thread
Results 1 to 3 of 3

Multiple Worksheet_Change macros - How to edit exisiting code to allow for multiple

  1. #1
    Registered User
    Join Date
    04-05-2019
    Location
    London, England
    MS-Off Ver
    MS 365 ProPlus
    Posts
    2

    Multiple Worksheet_Change macros - How to edit exisiting code to allow for multiple

    Hello a few years back I got some help to write a bit of code which would grey out a selection of cells depending on what was input to one particular cell. For the previous use the document worked perfectly but I am now looking to be able to have this feature in 3 separate places within the worksheet. They would need to work independently of each other, as in:

    Cell A1 says "Yes" grey out A3, otherwise grey out A4

    Cell A5 says "Positive" grey out A9, otherwise grey out A12

    Cell A14 says "correct" grey out A20, otherwise grey out A16

    The code current looks like this:

    Please Login or Register  to view this content.
    Any help would be appreciated as I am feeling very out of my depth.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Multiple Worksheet_Change macros - How to edit exisiting code to allow for multiple

    Is it vital that you use a macro?
    It seems to me that standard conditional formatting would achieve what you want.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    04-05-2019
    Location
    London, England
    MS-Off Ver
    MS 365 ProPlus
    Posts
    2
    Quote Originally Posted by Richard Buttrey View Post
    Is it vital that you use a macro?
    It seems to me that standard conditional formatting would achieve what you want.
    I’ll be honest I had help creating this so many years back, but that does sound like something that was discussed. The worksheet is a form that I use in the office. I have the worksheet protected, the majority of cells are locked to prevent other people editing it and I also have a button to reset all contents of the sheet back to default. I’m not sure if because of any of this it was decided to do everything in macro format rather than conditional formatting.

+ 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. Multiple Worksheet_Change macros in one workbook
    By malitec in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-09-2018, 07:58 AM
  2. [SOLVED] Multiple Worksheet_Change macros in one worksheet
    By mallan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2017, 04:22 PM
  3. 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
  4. How do you code Private Sub Worksheet_Change with multiple ValidateLookup Target's
    By rhett7660 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2016, 10:34 PM
  5. [SOLVED] Multiple Worksheet_Change macros?
    By gvglandsurveyors in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-26-2016, 09:31 AM
  6. [SOLVED] Combining multiple Worksheet_Change sets of code into one
    By haljam in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2014, 01:56 AM
  7. Importing multiple Worksheet_Change code modules
    By mmf144 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-01-2011, 03:30 PM

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