Closed Thread
Results 1 to 5 of 5

Creating workbooks from data in work book

  1. #1
    Registered User
    Join Date
    10-04-2010
    Location
    Ny,USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Creating workbooks from data in work book

    hi,
    i have a woork book with a list of names and numbers
    for ex:
    Jhon B 123
    Katy C 45
    Tom vxc 78

    and i want to create a vba function that will create a new work book for each name:
    Jhon B.xls
    Katy C.xls
    Tom vxc.xls
    and that each one of them will be with template and that the function will insert the name and the number to two predefined cells?

    i cant figure how to do this..
    (i know that theoritcly i need a while loop that will go trough all the rows and for each will create a file with the data from the first column,but dont know how to input inside the file that have to be with template)

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Creating workbooks from data in work book

    Maybe something like the attached example.

    Dom
    Attached Files Attached Files
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    10-04-2010
    Location
    Ny,USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Creating workbooks from data in work book

    Thanks Alot!!!
    i've come only with this:
    Please Login or Register  to view this content.
    but your's seems much better and exactly what i needed

  4. #4
    Registered User
    Join Date
    10-03-2011
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Creating workbooks from data in work book

    Hi,
    The Example that Domski posted is almost what I need as well, but I can't quite work out how to modify it to achieve the results I need. (VBA is not a strong point of mine).
    So in addition to creating individual workbooks with names derived from a master workbook, I need it to create additional worksheets per workbook (from the template), and write a couple bits of information in each generated work sheet. I have attached an example. So the result will be: The number of Workbooks depending on the number of "Save Worksbook Name"s, each with having 4 Worksheets (Template1, Template2, Template3, Template4), with each Template worksheet having the 2 beits of info written to it ("Name" & "Company").

    The assistance will be much appreciated!!!

    Cheers!

    Brad
    Attached Files Attached Files

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Creating workbooks from data in work book

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

Closed 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