+ Reply to Thread
Results 1 to 5 of 5

Possible Macro? Process repeats itself

  1. #1
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Possible Macro? Process repeats itself

    The steps I need to do are as follows
    Book1 Sheet1!A2-A49 paste into Book2 Data!H2-H49
    Book1 Sheet2!A2-A49 paste into Book2 Data!H98-H145
    Book1 Sheet3!A2-A49 paste into Book2 Data!H194-H241
    Book1 Sheet4!A2-A49 paste into Book2 Data!H290-H337
    Book1 Sheet5!A2-A49 paste into Book2 Data!H386-H433
    Then save and close - preferably with title of Book1 and today's date (this process will always be a Saturday) as the file name.

    Then:
    Almost the entire same process again but instead of cells A2-A49, it'll be B2-B49 but they get pasted into the same cells so the 'save and close' part is important otherwise I'm just going to keep overwriting my previous pasted info. Also I want the date to be Sunday's date.

    The process continues to repeat itself for columns A through G, and the file names will go from Saturday to Friday's date.

    Does anyone know if this is possible? I have the process of doing it piece by piece but what I don't have automated is the Save & Close, naming the file and moving onto copying the next set of cells from Book 1.

    I hope this isn't too confusing. I've been on this process for weeks now and I'm pretty much stuck and would like to get this process complete if this is actually a possibility with Excel 2010

  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: Possible Macro? Process repeats itself

    This macro goes into the Book1. Run it from there.

    You will need to edit the macro to give it the full path and filename of the Book2, as well as the path to where the new files will be saved.

    From there it will open that file, copy the data from column A and save the file with a new filename, then repeat with column B, etc. Each time it saves it will increment one column and one save date.

    Untested:
    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
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Possible Macro? Process repeats itself

    Can you post the code you have so far?

    Adding this to it...
    I have the process of doing it piece by piece but what I don't have automated is the Save & Close, naming the file and moving onto copying the next set of cells from Book 1.
    ...should be relatively simple.

    Also, give a few examples of the file naming convention to better illustrate exactly what you want.


    EDIT: too little, too late.

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Possible Macro? Process repeats itself

    @alphaFrog:
    too little, too late.
    Yep I also know that sickening feeling on the other hand take comfort in the fact you were beaten by one of the best.

    Alf

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

    Re: Possible Macro? Process repeats itself

    Hah! I wouldn't bet on that, I've seen AlphaFrog's stuff... good stuff it is!

+ 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