+ Reply to Thread
Results 1 to 3 of 3

Running Multiple Macros on Different Cell Changes

  1. #1
    Registered User
    Join Date
    12-11-2012
    Location
    Washington DC
    MS-Off Ver
    Office 2010
    Posts
    2

    Running Multiple Macros on Different Cell Changes

    Thanks in advance for your patience with me as I'm new to these forums, and pretty new to Macros/VBA in Excel.

    I have a workbook with multiple sheets that all feed data into two main sheets, called 'Timeline' and 'Dashboard'

    I have a macro to run an AutoResize function on 'Dashboard' rows:

    Please Login or Register  to view this content.
    And then I have the page code of each data source sheet execute the AutoResize macro when any of three different cells are modified on the sheets. From the page code:

    Please Login or Register  to view this content.
    So my question is this: I have the following NEW macro called AutoFilter, created to run an auto filter to hide any rows where values of "#N/A" are present from the 'Timeline' sheet:

    Please Login or Register  to view this content.
    When I run it manually, it filters out rows with "#N/A" just fine. So I want to then make an addition to the page code above to execute AutoFilter if a range of cells are changed. I tried the following (copied the WHOLE sheet code) but it doesn't work when I modify the cell in the column identified:

    Please Login or Register  to view this content.
    With this, the first portion still works (I modified one of the cells, and it executed the AutoResize macro just fine) - but if I enter data into the column that should trigger the AutoFilter macro, it doesn't fire off. I go to the 'Timeline' sheet, and see the new row isn't visible. But when I open up the Macros and run AutoFilter manually, it pops up just fine.

    I have tried just using Case "$C$18" in case ranges were not possible with this code, but that didn't help. I also tried doing just the Worksheet_Change1 code in a blank sheet using A1 as the reference trigger for firing off the AutoFilter macro, but that did not work either.

    So that's my issue - what am I missing to make my life a whole lot easier on this end? Thanks in advance for any help.
    Last edited by SF007; 12-22-2012 at 02:05 PM. Reason: Issue solved!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Running Multiple Macros on Different Cell Changes

    Something like this:?

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-11-2012
    Location
    Washington DC
    MS-Off Ver
    Office 2010
    Posts
    2

    Re: Running Multiple Macros on Different Cell Changes

    Ah, that worked perfectly - both the AutoResize and AutoFilterMacro (I updated the name because it would error out if I just called the macro AutoFilter since that is a property within Excel already) run with that code. Thank you SO much!

    Providing reputation feedback presently.

    Thanks again!

+ 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