+ Reply to Thread
Results 1 to 4 of 4

VBA - One sheet to become many based on one variable

  1. #1
    Registered User
    Join Date
    08-16-2011
    Location
    Birmingham
    MS-Off Ver
    Excel 2007
    Posts
    4

    Unhappy VBA - One sheet to become many based on one variable

    Hi all

    I have toiled and toiled with this hence the name I chose.

    Basically I produce an excel sheet each month, in column A is a Id, this Id can be repeated for several rows (varies) - what I need to do is create new workbooks for each Id and pull the data from the original table through too, so create new work books based on that Id and the corresponding info

    I could do filters etc for each of the known Ids (about 127) and then copy this into a new sheet but it would be messy and very rough code based on recording and trial and error

    I found this code which can create new workbooks for each of the Ids,

    can anyone help pulling through the data? at the moment its populating the field names only from the top of the document

    Please Login or Register  to view this content.

    Thanks guys, would help me a lot
    Last edited by Mordred; 08-16-2011 at 10:21 AM.

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: VBA - One sheet to become many based on one variable

    Hi fortheloveofgod and welcome to the forum. I am going to change your tags to be code tags instead of quote tags and I would ask that you use code tags in the future (for code examples). You could type in the tags by using the following example
    [CODE]Sub YourCode()[/CODE]

    Thanks!
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

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

    Re: VBA - One sheet to become many based on one variable

    here's some basic code that should work for you with some slight tweaking to suit.
    Please Login or Register  to view this content.
    Hope that helps.

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

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    08-16-2011
    Location
    Birmingham
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: VBA - One sheet to become many based on one variable

    Thanks guys, sorry about the wrong quote thing, i'll go have a play with that code, thank you so much for the help!

    Hopefully I can help some people rather than just being a pain, my VBA leaves a lot to be desired though.

+ 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