+ Reply to Thread
Results 1 to 14 of 14

Macro to Tabulate 100k Data into Individual Sheets

  1. #1
    Registered User
    Join Date
    03-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    25

    Macro to Tabulate 100k Data into Individual Sheets

    Hi,

    I need to copy/move data from the main database to individual sheets based on the number of assets.

    My number of assets can ranged from 1-1000.
    Is it possible to automate the creation of sheets based on the number of assets?

    The file is too big. But my rows = 102k, columns from A - V.
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to Tabulate 100k Data into Individual Sheets

    Should the sheets be created based on the asset_ID? Should the sheet be named the same as the asset_id?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    03-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Macro to Tabulate 100k Data into Individual Sheets

    The sheets can be named according to asset id but the sheets must consist of the same total number of assets.

    Means i need to consolidate all the same number of assets into one sheet. (eg. 1 asset into 1 sheet, 100 assets into 1 sheet)
    if there are more than 1 person who have 1 asset then should be consolidated into 1 sheet.

    I have this macro but it can only hold 30 arguements.And i have to manually create 1000 sheets.
    shDest = WorksheetFunction.Choose(AllCells.Rows.Count , "2 Assets", "3 Assets", "4 Assets", "5 Assets")


    Please Login or Register  to view this content.
    Last edited by Cutter; 08-29-2012 at 10:37 PM. Reason: Added code tags

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Macro to Tabulate 100k Data into Individual Sheets

    @ leeaw

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Macro to Tabulate 100k Data into Individual Sheets

    Try this
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Macro to Tabulate 100k Data into Individual Sheets

    Hi Jindon,

    I have used the macro. But it does not move the number of assets to the correct sheets. But rather it actually shifted the assets to different sheets based on the project id.

    The sheets should be based on the numbers of assets i have. (eg. Sheet 1 should comprise of all 1 asset, sheet 2 (2 assets) ... )

    eg. In the data Andrew has 3 assets based on the S/NO. Peter has 2 assets based on the S/NO.

    1. Notebook Andrew
    2. PC Andrew
    3. Scanner Andrew
    1. PC Peter
    2. Notebook Peter
    1. PDA Jackson
    2. PDA Jackson
    3. IPAD Jackson
    4. IPhone Jackson

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Macro to Tabulate 100k Data into Individual Sheets

    Do you mean like this?

    Otherwise I need a workbook with your desired result.

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    03-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Macro to Tabulate 100k Data into Individual Sheets

    sorry for the inconvienced. The macro duplicated from the Main Sheet. Most likely is because all have number 1 in it.

    Please see the attachment.

    The main is the database. It should rightfully go into the respective Asset sheets.
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Macro to Tabulate 100k Data into Individual Sheets

    According to your code
    Please Login or Register  to view this content.
    It is adding the records after the existing records.

    Do you want refresh all the sheets and paste the records as new?

  10. #10
    Registered User
    Join Date
    03-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Macro to Tabulate 100k Data into Individual Sheets

    where do i paste the records? Thanks

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Macro to Tabulate 100k Data into Individual Sheets

    Quote Originally Posted by leeaw View Post
    where do i paste the records? Thanks
    What do you mean? thanks.

  12. #12
    Registered User
    Join Date
    03-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Macro to Tabulate 100k Data into Individual Sheets

    sorry i misunderstood your question.

    Should be paste the records as new into the individual sheets.

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Macro to Tabulate 100k Data into Individual Sheets

    I don't understand what you mean.

    try
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    03-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Macro to Tabulate 100k Data into Individual Sheets

    yes yes this is the one. Thanks!!! it works.

+ 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