+ Reply to Thread
Results 1 to 4 of 4

Split one worksheet into multiple worksheet by column

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    Gurgaon, India
    MS-Off Ver
    Excel 2010
    Posts
    6

    Split one worksheet into multiple worksheet by column

    Thanks for reading this query.

    I have a consolidated income statement for all the group companies. The particulars are in column A, the relevant numbers for each entity in the subsequent columns,(Please refer "Report" tab of the attached file) for example.

    A B C D E
    1 Particulars Entity 1 Entity2 Entity 3 Entity 4
    2
    3 Total revenue 1000 2000 3000 4000

    I need to split this worksheet into 1 worksheet per entity and Column A needs to be included on all worksheets, for example - Columns A & B for Entity 1, Columns A & C for Entity 2, Columns A & D for Entity 3, and so on.

    If possible the new worksheets could be named after the Entity names in Row 1, so that they are easily identifiable. I have around 500 companies on the list and hence need a macro to split the worksheet. I hope I am not asking for too much.

    If copying column A is not possible, its ok. I would still be happy if I have 500 sheets with the numbers for that individual entity. I can then use the group feature of Excel and copy/past column A.

    Please see the attached workbook for more clarity on the problem. The Report tab is what I currently have. The remaining 5 tabs are what I want to achieve.

    Any help is appreciated. Many thanks in advance.

    Kind regards,

    Vijay

    I did search the forum, but I found macros which would copy rows into multiple worksheets based on values in a particular column. I din't find anything similar to my requirement.
    Attached Files Attached Files
    Last edited by vdivgi; 10-19-2012 at 09:22 AM. Reason: I am using Excel 2007/2010

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Split one worksheet into multiple worksheet by column

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    07-25-2012
    Location
    Gurgaon, India
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Split one worksheet into multiple worksheet by column

    @ Patel45

    The macro is awesome.. Did the job in less than 2 minutes..Thank you very much for your help.

    There is a small issue though..After creating the last sheet, I get a "400" error (there is no other text on the message box). But when I click on OK, it just vanishes.

    I believe that is because we are adding one sheet less than the number of columns used in the Report tab (Column A is for the Particulars). I made a small change to your code. I put a -1 at the end of the line 'numcol' i.e. [numcol = sh.UsedRange.Columns.Count - 1] and the error message is not appearing any more.

    Thanks again for your help.

    Kind regards,

    Vijay

    Thanks again for

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Split one worksheet into multiple worksheet by column

    thanks for your feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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