+ Reply to Thread
Results 1 to 11 of 11

Large amt of data needing to be split onto diff tabs

  1. #1
    Registered User
    Join Date
    07-17-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    6

    Question Large amt of data needing to be split onto diff tabs

    I run a wkly report and currently copy/paste each group of data onto its own separate tab. I would like to know if there is some kind of way to do this in excel. This report consists of data from our 28 locations. I would need to have a tab per location then move each location's data onto its own tab within the same report. Any help or suggestions would be appreciated. Thanks.

  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: Large amt of data needing to be split onto diff tabs

    Sure, this can be done fairly easily. Why dont you upload a sample file with some dummy data?

    To Attach a File:

    1. Click on Go Advanced.
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    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
    07-17-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Large amt of data needing to be split onto diff tabs

    Here is a file. it is already sorted by Loc #. I need all of loc 01 in its own tab and all of loc 04 in its own tab, etc. (loc 02 and 03 don't exist). This file is sent to all locs and they should have their own tabs. This has been driving me crazy for 6 years. Thanks for your help.
    Attached Files Attached Files

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

    Re: Large amt of data needing to be split onto diff tabs

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button

  5. #5
    Registered User
    Join Date
    07-17-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Large amt of data needing to be split onto diff tabs

    thanks for all that. Is there a SAVE step missing. I paste it in but its not there when I try to run it. Sorry to sound like a lacky but I'm no programmer....

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

    Re: Large amt of data needing to be split onto diff tabs

    You put the code in the code window. When you save your excel file, the code will get saved. Alternatively, you can click on the floppy disk icon in the code window itself.

  7. #7
    Registered User
    Join Date
    07-17-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Large amt of data needing to be split onto diff tabs

    OMG! You Rock! Thank you soooooo much.
    One more thing.....do I need to copy this in for each time I run the report, or is this In Excel to use with other reports?

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

    Re: Large amt of data needing to be split onto diff tabs

    For this particular report, you do not need to copy the code over again. You can just use it directly.

    Your statement brings me to this question - if you have run this macro once and want to run it again on the same report with more data, do you want the contents of the tabs to be deleted and fresh data input? Or should the data be input at the base of the existing data in each tab?

    If you want to use this macro for other reports, you might have to change a few things depending on the report. If the layout of the other reports is the same as the existing report, you can go ahead and use it.

  9. #9
    Registered User
    Join Date
    07-17-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Large amt of data needing to be split onto diff tabs

    once I create the following weeks report and open with Excel, I will need to run the macro again. I don't know if this macro can be in Excel, available for the next run of the same report. What I did to get around this is open the report that was already run with this macro as well as the newer report. If they are both open, I can run a macro from all open docs which will run the macro into the new report.
    Thanks,
    Arliene

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

    Re: Large amt of data needing to be split onto diff tabs

    Yes you can do it.

    As long as this line
    Please Login or Register  to view this content.
    does not have a workbook name before it ..for e.g
    Please Login or Register  to view this content.
    , then you can use it with any workbook. It will always run on the data in the 1st sheet. You can change that to whatever you want to customize it like
    Please Login or Register  to view this content.
    You can also have this macro in an independent macro file which you can use to save all your macros.

  11. #11
    Registered User
    Join Date
    07-17-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Large amt of data needing to be split onto diff tabs

    how can I save it in an independant file. If I create a new file, how can I run the macro without having to open the last file with it?

+ 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