+ Reply to Thread
Results 1 to 4 of 4

Excel VBA Macro loop to run a macro multiple times based on a column from a table

  1. #1
    Registered User
    Join Date
    11-26-2020
    Location
    US
    MS-Off Ver
    Office365
    Posts
    2

    Question Excel VBA Macro loop to run a macro multiple times based on a column from a table

    I have built a Macro that does Data conditioning and it runs great!
    Now I am trying to automate the input of the data.

    Right now I am doing this by going into the Sheet "dataALL," where it has five columns.
    Then I filter by column 3 and copy all those into Sheet "data" where there is another table with the same column names 1-5.
    Run the macro based on that table, which creates a separate sheet with all the data conditioning, and once done, clear the table.
    Then I go back to the "dataALL" sheet, filter the second one of column 3 and repeat for all of them (over 100)

    --

    I have record it (hard code) for the first two filtered names below below.
    I would like to make a loop that does this for all on the filter list.
    Not sure how to. PLEASE HELP!
    --
    Where:
    Sheets "dataALL" has the table "DataTable2"
    Sheet "data" has the table "DataTable"
    The name of the macro to run each time is "AA_MACRO" (Application.Run "'WORKBOOK.xlsm'!AA_MACRO")


    Please Login or Register  to view this content.


    Thanks! I have some experience with macros but not sure how to implement a loop to this scale, so anything helps! (let me know if anything needs to be clarified)
    Attached Files Attached Files
    Last edited by pepeadad; 11-26-2020 at 05:06 PM. Reason: Added workbook

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Excel VBA Macro loop to run a macro multiple times based on a column from a table

    To assist you in this, please follow the instructions in the yellow banner above.

  3. #3
    Registered User
    Join Date
    11-26-2020
    Location
    US
    MS-Off Ver
    Office365
    Posts
    2

    Re: Excel VBA Macro loop to run a macro multiple times based on a column from a table

    Thank you maniacb I have added some examples

  4. #4
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Excel VBA Macro loop to run a macro multiple times based on a column from a table

    Try this. What is done with the info on data tab is unclear.

    Please Login or Register  to view this content.
    Last edited by maniacb; 11-27-2020 at 12:02 PM.

+ 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. Time Based Macro running multiple times when it shouldn't
    By bberger1985 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-06-2014, 11:38 AM
  2. Time based macro running multiple times
    By bberger1985 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2014, 05:54 PM
  3. Replies: 0
    Last Post: 06-25-2013, 09:46 AM
  4. [SOLVED] Need a Macro that will duplicate rows a number of times based on a column value
    By Lassitude in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-11-2013, 12:04 PM
  5. Macro to Sum Multiple Times in Column Based on Variable Range
    By kareni in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-22-2011, 08:15 PM
  6. Macro to Loop Print 1 Template multiple times
    By run2win17 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2011, 03:29 PM
  7. Macro Loop – Find Specific Times, Extract Date, Average Values of Times
    By ExcelQuestFL in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-25-2010, 02:50 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