+ Reply to Thread
Results 1 to 6 of 6

macro to split up a row of data, while repeating first columns

  1. #1
    Registered User
    Join Date
    11-05-2011
    Location
    Chesapeake, VA
    MS-Off Ver
    Excel 2010
    Posts
    7

    macro to split up a row of data, while repeating first columns

    Hello, I am trying to collect data for my school from all the teachers. They are currently collecting data using Google form and they are having to submit a form for every student. I was hoping to try and have a form that would allow the teacher to input their data, that is constant, and then all the different students. I think this will create a google response sheet that looks something like the sample. What I want is to be able to run a macro that would keep the teacher name, class and bell and then take the next 3 columns and make new rows, depending on how many students each teacher enters. I included one where the first section of students was blank, in case a teacher typed the info in the wrong section. Any help would be appreciated.

    Book1.xlsx

    So basically when i collect the data it comes in like this:
    Teacher -- Class -- Bell -- Student Name -- ID -- Absences -- Student Name -- ID -- Absences --Student Name -- ID -- Absences --Student Name -- ID -- Absences

    But I want it to break off the extra student info and make just the first 6 columns.
    I'm still trying to figure out exactly how to get the google form to work correctly, but I figured this part was the most pressing and challenging.

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: macro to split up a row of data, while repeating first columns

    Creates a new sheet for you every time it runs called "New Format" plus a number. Also assumes your raw data is on a sheet called "Sheet1". If not, change the first line of code to match your sheet name.

    Please Login or Register  to view this content.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Registered User
    Join Date
    11-05-2011
    Location
    Chesapeake, VA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: macro to split up a row of data, while repeating first columns

    This seems to work perfectly. Just a quick question... Is there any chance you could give some explanation as to what each part of the code is doing, so that if I need to change it later to adapt to new situation, I would hopefully be able to fix it without bothering all you incredibly smart people. Thanks.

    Ray

  4. #4
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: macro to split up a row of data, while repeating first columns

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-05-2011
    Location
    Chesapeake, VA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: macro to split up a row of data, while repeating first columns

    You are awesome, thanks for your help. I hopefully can make this all work and not have to bother you any more.

  6. #6
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: macro to split up a row of data, while repeating first columns

    Glad to help. If you do have more questions, that's fine, but if you're satisfied with the solution for now, please mark this thread as SOLVED. And any reputation points (the * in the lower left of the posts) is appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need Macro code to split data split in 7 sheets based on variable rows in column A
    By Alija_21 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2015, 08:03 AM
  2. Replies: 7
    Last Post: 02-05-2015, 03:20 PM
  3. Split Strings Into Columns Based On Repeating Characters - Macro
    By jessekanclerz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2013, 11:13 AM
  4. Split uneven data from a single columns to multiple columns
    By pfoz in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-13-2013, 08:24 AM
  5. [SOLVED] Macro to split data into different columns
    By lmurillo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-20-2013, 12:36 PM
  6. Data Repeating Characters into Muliple Columns
    By stva1006 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-30-2012, 06:30 PM
  7. Repeating data in 1 column to multiple columns
    By tjones in forum Excel General
    Replies: 2
    Last Post: 12-07-2007, 07:50 PM

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