+ Reply to Thread
Results 1 to 5 of 5

Macro that can grab dates within a parameterized list and insert rows with those dates

  1. #1
    Registered User
    Join Date
    02-04-2014
    Location
    Baltimore, Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Macro that can grab dates within a parameterized list and insert rows with those dates

    This macro will need to do this for multiple date ranges, for example:

    Sheet1 has a list of date ranges; Column A is all your start dates and Column B is the ending date respectfully to each row. There will be another sheet within the same workbook, Sheet2 that has a list of dates in column A.

    I need this macro code to go through each rows date range on Sheet1 and for all the dates on Sheet2 column A that fall within that date range, insert those dates under the row it scanned in column C. It needs to continue doing this until each row has been searched and executed accordingly.



    Please see the files for reference below. The file before the macro is run, is the file that I would want manipulated according to the ideas above. The other file post macro run is what an example of the output would be (of course I did mine by manually scanning and inserting/moving the dates to column C.
    Thanks for everyone's assistance!!!!!

    post macro run.xlsx
    example of file before macro is run.xlsx
    Last edited by UMBiii; 06-05-2014 at 03:15 PM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Macro that can grab dates within a parameterized list and insert rows with those dates

    See next code, it does not give the complete same result but try
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by PCI; 06-05-2014 at 05:13 PM.

  3. #3
    Registered User
    Join Date
    02-04-2014
    Location
    Baltimore, Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Macro that can grab dates within a parameterized list and insert rows with those dates

    Hello PCI,

    Thank you very much for your assistance!

    Your code worked! I am now going to go through and reverse engineer the code to learn all the pieces and how they work. I am new to programming/VBA and up to this point have created macros only by using the macro recorder (which has hindered me from creating more complex macros.) Are there any particular resources that you know of that would assist in expediting my learning of VBA?

    Thanks again for all your time, it is greatly appreciated!!!!

    Best regards,


    Andy

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Macro that can grab dates within a parameterized list and insert rows with those dates

    The best way I found to learn Excel and VBA ( and I discovered it a bit late), is this forum (exist some others also).
    Read the threads and see the answers sent, it is a very good school.
    One test will be when you will give a answer back and the reward will be the thanks from the requester.
    Good luck
    PCI

  5. #5
    Registered User
    Join Date
    02-04-2014
    Location
    Baltimore, Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Macro that can grab dates within a parameterized list and insert rows with those dates

    Thank you very much!

+ 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. [SOLVED] Macro to insert list of dates with conditions
    By Barking_Mad in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-23-2013, 05:23 AM
  2. Replies: 6
    Last Post: 03-11-2013, 06:11 PM
  3. [SOLVED] Highlight Group of Dates if Dates Match List of other Dates
    By martinpgibson in forum Excel General
    Replies: 5
    Last Post: 10-24-2012, 08:14 PM
  4. Insert rows for missing dates
    By areeves1980 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-06-2009, 10:59 AM
  5. Insert list of dates from a my WKS
    By harryhill in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-16-2007, 01:48 AM

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