+ Reply to Thread
Results 1 to 2 of 2

How do I run two macros in a document (adding a new macro to a working one)? Thank you :)

  1. #1
    Registered User
    Join Date
    11-06-2012
    Location
    Washington, D.C.
    MS-Off Ver
    Excel 2010
    Posts
    1

    Post How do I run two macros in a document (adding a new macro to a working one)? Thank you :)

    Dear all,

    I need help to run two macros in the attached document: "List of Projects (2012-11-06) - Public".

    Macro #1
    One of the macros is working in the "List of Projects" and it allows users to select multiple items from a drop-down menu and combine the results in a single cell (column H). No need to change anything. Works perfect.

    Macro #2
    There is a series of dependent drop-down menus in columns C, D, E. With "C" being the primary one. I want to add another macro that will automatically clear both columns D & E if C is changed, or clear only E if D is changed. I could not add another macro so I put in conditional formatting to alert users. But there is one flaw... If users change their initial choice in column C (while D&E are both populated) only column D will be highlighted and column E does not activate a warning (leaving outdated text choice in the cell). The second working macro is in document: "Simple1.xlsm" but I don't know how to combine them. I am not VBA programmer and got Macro #1 and Macro #2 from the Internet.

    Solution: (A) Either improve conditional formatting, or (B) find another macro that will clear the choices...

    Any ideas? THANK YOU!!!
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: How do I run two macros in a document (adding a new macro to a working one)? Thank you

    See attached file which I modified to, I hope, answer your question. You'll see that I added some Case to the actual program to take into account changes made to rows 3,4 and 5 which are the columns of your drop down cells.
    If column C is changed, The program will delete contents of cells D and E of that row and change their color.
    If the operator changes the content of cell in column D, the program will erase the content of cell in column E and change the color of cell D to revert it to original Light blue.
    If cell in column E is changed, only its color will be revert to light blue.
    Thus the operator knows all cells have been updated.
    Is this what you were expecting?
    Regards
    Attached Files Attached Files
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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