+ Reply to Thread
Results 1 to 10 of 10

create sheets' data from master sheet

  1. #1
    Registered User
    Join Date
    10-12-2010
    Location
    Dayton, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    12

    create sheets' data from master sheet

    I have a master sheet of data for a number of individuals and would like to create a sheet for each for their ease.

    For example:
    Master Sheet

    A b c
    Jane Doe amount 1 reason 1
    Jon Doe amount 2 reason 2
    Tom Smith amount 3 reason 3
    Jane Doe amount 4 reason 4
    Jon Doe amount 5 reason 5
    Tom Smith amount 6 reason 6
    Jane Doe amount 7 reason 7
    Jane Doe amount 8 reason 8
    Tom Smith amount 9 reason 9

    I'd like to have sheets for Jane Doe, Jon Doe and Tom Smith. Jane Doe's sheet would look like:

    A B
    amount 1 reason 1
    amount 4 reason 4
    amount 7 reason 7
    amount 8 reason 8

    IN order to accomplish this, can I use a formula or do I need some VB code? If code, any way to make the macro automatic, such as when it's opened or printed?

    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: create sheets' data from master sheet

    I have a macro that may be "ready to use" for parsing rows of data from one sheet to many sheets named for the same values.It not only can parse the rows, it can create the sheets if they are missing.
    _________________
    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
    10-12-2010
    Location
    Dayton, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: create sheets' data from master sheet

    Yes, that macro works very well - thank you.

    I'd like to modify it so that I get a total for two of the columns on each page. Any suggestions on modifying the macro for this?

    thanks again.

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

    Re: create sheets' data from master sheet

    Show me what you mean in a sample workbook created from the macro and with the stuff manually added that you want.

    Click GO ADVANCED and use the paperclip icon to post up a desensitized copy of your workbook.

  5. #5
    Registered User
    Join Date
    10-12-2010
    Location
    Dayton, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: create sheets' data from master sheet

    Quote Originally Posted by JBeaucaire View Post
    Show me what you mean in a sample workbook created from the macro and with the stuff manually added that you want.

    Click GO ADVANCED and use the paperclip icon to post up a desensitized copy of your workbook.
    Here it is. I did the calculation two ways. Now that I think about it, the second way is probably best as you don't need to know the depth of rows above you and the formula can be the same on each page.

    Thanks again.
    Attached Files Attached Files

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

    Re: create sheets' data from master sheet

    I didn't see the macro in the file, did you edit it in any way?

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

    Re: create sheets' data from master sheet

    Just add this to macro:

    Please Login or Register  to view this content.

    The first and last lines of that code example are already in the macro, add the stuff in the middle.

  8. #8
    Registered User
    Join Date
    10-12-2010
    Location
    Dayton, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: create sheets' data from master sheet

    I had not modified the macro other then to specify the options. Thanks for your help. I'll add this to the macro.

    Thanks again!

  9. #9
    Registered User
    Join Date
    10-12-2010
    Location
    Dayton, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: create sheets' data from master sheet

    I have several sheets that I need to use as the source sheet for this macro. I currently use a different macro for each sheet, but it seems to me there is a way to have a variable for the sheet name.

    How can I pass in a sheet name to the macro so I can use the same macro for all sheets?

    Thanks.
    Last edited by ShadowRider; 10-16-2010 at 11:16 PM.

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

    Re: create sheets' data from master sheet

    Well "ALL SHEETS" is a dangerous phrase. You mean "all the sheets I want to parse from".

    This version has an array added where you can list all the sheet names to parse data from.

    Please Login or Register  to view this content.

+ 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