+ Reply to Thread
Results 1 to 3 of 3

Create individual worksheets for reoccuring data on a single worksheet.

  1. #1
    Registered User
    Join Date
    01-28-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    2

    Create individual worksheets for reoccuring data on a single worksheet.

    Hi,
    I have data on a worksheet with multiple columns of information from an experiment going down in rows. One of the the columns identifies the trial type (1, 2, 3 or 4) The trials are multiple cells long (roughly 200 cells), and occur multiple times with breaks between trials that are ID'd as 0). The trial ID column looks a little like this:
    0
    0
    0
    1
    1
    1
    .
    .
    .
    1
    1
    1
    0
    0
    0
    0
    0
    3
    3
    3
    3
    .
    .
    3
    3
    3
    0
    0
    0
    0
    0
    2
    2
    2
    .
    .
    .
    2
    2
    2
    0
    0
    0
    etc...

    I would like to use a macro that takes all the information for each trial, and puts this on a seperate worksheet that is labled in accending order, e.g. 1,2,3,4,5,6, etc, and has the trial type on it (1:4). So the worksheet for the second tiral might be 2_3.
    I've seen scripts that allow this to be done if the data only occurs once, ie. a new worksheet for a different name, however I need to have a worksheet for each occurance of a section of data.
    Thank you in advance for any help!
    Ben

  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: Create individual worksheets for reoccuring data on a single worksheet.

    Your question is not very clear. Why dont you explain with the help of a sample file which contains a before and after sheet?

    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
    01-28-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Create individual worksheets for reoccuring data on a single worksheet.

    Thanks Arlu,

    Here is an attached example. AS you can see on the worksheet 'Master' the trial ID codes are in column A, and the data in column B. For the first six trials I've copied all the information from the trial, and pasted it in a new worksheet that's name is based on the cronological order of the trial, and the type of tiral it is. I.e. 1_3, as it's the first trial, and is of type 3, then 2_1, and so on.

    However I have lots of these so I would like to be able to do it automaticly. ALso you can see there is a section of 0's between each trial. This data can be ignored when copyon tirals to seperate sheets.
    Thank you
    Ben
    Attached Files Attached Files

+ 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