+ Reply to Thread
Results 1 to 6 of 6

Creating multiple excel files based on list of items

  1. #1
    Registered User
    Join Date
    11-30-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    7
    Posts
    10

    Creating multiple excel files based on list of items

    Hi everybody,

    I have a list of 500 items as an excel file. The name of each item is saved in the column A of the excel file ItemList.xlsx:

    Item1
    Item2
    Item3
    ...
    Item500

    I need to write a macro which will create an empty excel file for each item and give each file the same name, as the name of the item. So at the end I need to have 500 excel files named Item1.xlsx, Item2.xlsx, ...Item500.xlsx.

    Could you please help me?
    Last edited by AlexeyY; 12-06-2015 at 07:35 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Creating multiple excel files based on list of items

    Hi AlexeyY,

    Welcome to the Forum!

    I put them all in the same folder as the calling routine - hope that works

    Please Login or Register  to view this content.
    If you haven't used macros before you'll need to go to:
    File- options - trust center -trust center settings - macro settings ,
    the second option down (disable all macros with notification)

    Then - Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select "Module" from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    *Be sure to save the book with the code as Macro-Enabled
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    11-30-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    7
    Posts
    10

    Re: Creating multiple excel files based on list of items

    This is working great! Thank you!

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Creating multiple excel files based on list of items

    You're welcome and thanks for the rep!

  5. #5
    Registered User
    Join Date
    11-30-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    7
    Posts
    10

    Re: Creating multiple excel files based on list of items

    Just one more question on creating files using an existing list of items in an excel file.
    The code above should be built in into the excel file with the list of items. How should I re-write the code if my list of items is available in another excel file?

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Creating multiple excel files based on list of items

    The code above should be built in into the excel file with the list of items.
    That's not necessary - you could have the code in any workbook - I suggest an utility book with codes.

    Notice that it creates another book from the "ActiveBook" not "ThisBook".

+ 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. macro for creating large list of files based form one template file
    By stindzis in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-26-2014, 03:02 PM
  2. Sum from multiple items in a list, based on rank, until a total is met
    By tim_71 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-19-2013, 09:17 PM
  3. [SOLVED] Creating a grocery list in a new worksheet based on selected items in a master list
    By jacolli4 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-28-2012, 07:53 AM
  4. Replies: 1
    Last Post: 05-14-2012, 05:06 AM
  5. Creating multiple files from a file based on field contents
    By charbomb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2011, 06:56 PM
  6. Creating a drop-down list & selecting multiple items
    By Jamie6521 in forum Excel General
    Replies: 1
    Last Post: 02-08-2009, 02:53 AM
  7. Replies: 1
    Last Post: 11-28-2005, 11:20 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