Rabu, 05 Februari 2014

[MS_AccessPros] Copying chunks of data to a new location with macro

 

I have a situation where information is being sorted by the items in Column A.  The info in that column is repeating since it represents classroom teachers.  The rest of the row represents data about each of their students--one row per student.  So the teacher name in Column A repeats for each student's info.  At the end of that class the teacher name changes and this happens again for the next teacher until there are no more classes.

I need to copy all the rows for an individual teacher to a new location in the Worksheet.  Each teacher and the corresponding student data is copied to its own location so that the information in Column A is separated out.  The original data in Column A needs to stay where it is. The number of teachers represented in Column A isn't always going to be the same because different grades have more or fewer classes/teachers.  It would be nice, and easy if this wasn't the case.  But, I'm not sure how to go about this.

One thought I had was to insert a blank row between the end of one teacher and the beginning of the next teacher.  Then I'd know what chunk of data to grab and move. I know how to insert the blank row, but my problem is I don't know how to grab each chunk and move it and also determine when I'm out of classes so I can stop trying to move data.

Is there a better way to go about this?  Any help would be greatly appreciated.

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
.

__,_._,___

Tidak ada komentar:

Posting Komentar