+ Reply to Thread
Results 1 to 3 of 3

Open, split worksheet into separate workbook, save splited workbooks

  1. #1
    Registered User
    Join Date
    05-04-2015
    Location
    Warsaw
    MS-Off Ver
    2010
    Posts
    2

    Open, split worksheet into separate workbook, save splited workbooks

    Hello,

    I'm new to VBA and want to write a macro which will open an excel file (macro will be run from acces) split it to separate workbooks (each workbook will have the unique strings from col A) and saved withe the same name from col A.

    I've a bit of code but it's not working properly.

    Please Login or Register  to view this content.
    Help greatly apprecaited,
    s.
    Last edited by JBeaucaire; 05-04-2015 at 11:18 AM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

  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: Open, split worksheet into separate workbook, save splited workbooks

    'ONE SHEET to WORKBOOKS (1)
    Here's a macro for taking a sheet with data and creating individual wbs from each unique value in a chosen column. The date is added to the workbook names to give a reference as to when the wbs were created.
    This also uses column A and seems to be a similar approach to what you're trying to do, so use this as code examples for adapting your macro.
    Last edited by JBeaucaire; 12-26-2019 at 04:19 PM.
    _________________
    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
    05-04-2015
    Location
    Warsaw
    MS-Off Ver
    2010
    Posts
    2

    Re: Open, split worksheet into separate workbook, save splited workbooks

    Thanks a lot for help! I have couple of more questions:

    1/ as the macro has to reference to the external file (workbook), which will be exported from access could you please tell me how to modify this statement. Is it the only statement I’ve to modify?
    'Sheet with data in it
    Set ws = Sheets("Original Data")
    2/ I want to change a format of the saved files to that of the eclosed file:

    I’d grateful if you could show me how to modify your code to match the new format (on 2,3 records of enclosed example)
    s.
    new_format.xls

+ 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. Split multi-tab workbook into separate workbooks
    By ahurst105 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2013, 06:51 PM
  2. Copy Data From Multiple Open Workbooks to Another Workbook with Separate Worksheets
    By lupitenis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2012, 05:36 PM
  3. Add data from multiple workbooks that are open and save it in a new workbook
    By harry_b83 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2012, 03:14 AM
  4. Split Excel report and save separate Workbooks to respective locations
    By seattle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2010, 03:30 AM
  5. [SOLVED] Macro to Split Workbook into separate Workbooks
    By jmurray in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-14-2009, 04:44 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