+ Reply to Thread
Results 1 to 5 of 5

Run Conditional Format Macro without direct cell input

  1. #1
    Registered User
    Join Date
    11-07-2007
    Posts
    38

    Run Conditional Format Macro without direct cell input

    Hello, attached is an example of a file that is used to track status of multiple teams. Each team has a tab and a macro that changes cell color based on direct cell input. The 3rd tab in this spreadsheet is used to quickly roll up all of the teams into one sheet. The cells values are references to the cells in each of the individual tabs.

    The problem I am having is making the formating apply in the rollup tab. It is set up to look for direct cell input to run the macro, but that isn't how the rollup worksheet is updated. What's the best way to modify this code to make it work?

    Here is the code for the rollup worksheet.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    11-07-2007
    Posts
    38

    Re: Run Conditional Format Macro without direct cell input

    I did find a way to just record a macro to copy and paste the cells back over themselves and then associated that macro with an action button. It would be nice to not have to use a button at all.

  3. #3
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Run Conditional Format Macro without direct cell input

    Hi statenja;

    Have it triggered by the Worksheet_Calculate(), instead of the Worksheet_Change().
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  4. #4
    Registered User
    Join Date
    11-07-2007
    Posts
    38

    Re: Run Conditional Format Macro without direct cell input

    I tried changing the Worksheet_Change to Worksheet_Calculate and got a compile error because the procedure declaration does not match description of event or procedure having the same name. How should I change the target range to resolve the error?

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Run Conditional Format Macro without direct cell input

    Hi statenja;

    There is no "Target" in the Worksheet_Calculate(). The easiest way to make sure you have the syntax correct:

    In the window where Worksheet_Change() is, there are 2 dropdown boxes at the top. Make sure the left one says "Worksheet", and then select "Calculate" in the right box. That will create an empty macro that has the correct words for the macro name.

    Then just cut and paste the code from the old macro into the correct one. And be sure and delete the old one, otherwise Excel will get confused because there will be 2 macros with the same name.

+ 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