+ Reply to Thread
Results 1 to 24 of 24

Macro to create a looping macro to populate another worksheet.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: Macro to create a looping macro to populate another worksheet.

    I have taken the liberty of attaching a new file. It will simulate the results of what the after effect would be after the macro is run.
    As you can see on INPUTS the starting line number for Data extraction is 112 which coincides with 6/8/16 on the SETTLEMENT PRICES Page. SO the Macro now knows to start at line 112 and continue until the last line of data is examined (in my example that number is found on INPUTS B2).
    So as you can see the macro is supposed to take the data for that specific day and post it to the OUPUT Sheet.

    So I was thinking the flow of this macro would go something like this:
    User enters the starting line number in B1 on the INPUTS page (112 in this example) and clicks the Process Button.
    The macro knows that the LOOP is going to be 6 long 112 through 117.
    The macro then pastes as a number the first date (in this case 6/8/16) into INPUT B4.
    When the date is entered into B4 it will auto populate F2 and G2 (which in turn will populate K2, L2, and M2 on the OUTPUT page.
    The macro will then select the OUTPUT page and copy as values K2:M2 into the next open row in A:C.
    The macro will then select the INPUTS page again and change the date in B4 (in this case to 6/9/16)
    The macro will then repeat the process again as described above for 6/9, 6/10, 6/13, 6/14, and finally 6/15.

    As you can see this is only 6 lines of data but the real program when complete will be 100’s long and the formula used in F2 and G2 on the INPUTS page will be MUCH more complex.
    The problem is I am NOT a VBA programmer but rather a good HACK.. If I have the basic macro to do the above request I can ADD more details to it once I see the structure and understand how it works.
    SIDE NOTE:
    What WOULD be cool would be to be able to enter the DATE into B! on INPUTS and not the line number associated with the date…….


    Thank you again for your help with this!
    Attached Files Attached Files

+ 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. How to create Macro that will auto populate the next 7 days
    By Gryphon87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-30-2015, 08:32 PM
  2. Create a looping macro that stops at pre determined row?
    By trade in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-01-2015, 04:29 PM
  3. [SOLVED] Looping Worksheet Macro - Skip a Sheet
    By tudley in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-03-2015, 12:32 AM
  4. [SOLVED] Multiiple Worksheet Loop Macro only Looping on 1 sheet
    By lscarstens in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2012, 02:44 PM
  5. Can you create a macro that creates a macro and saves to a worksheet?
    By rob.parson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2012, 07:49 PM
  6. Looping Macro to split one worksheet into multiple
    By DLE2885 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2012, 03:16 AM
  7. Create a Looping macro which copies and inserts rows
    By BenR in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2007, 02:13 PM

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