Yuffiek133
New Member
- Joined
- Mar 6, 2016
- Messages
- 2
Hello everyone,
My problem looks simple on paper, but I have no idea how to get a macro to do what I want it to do. Right now, I have it to the point where it will move the entire contents of a single row into column A, but I need it to move the contents of three columns, D, E, and F, row by row, into columns A, B, and C, underneath data that is currently in there. So it needs to create a new row under current data (row 1 = current, row 2 = new), move the current row D, E, F into that row, and move on to the next entry in D,E,F and move that into a new row under what would now be (row 3 = current, row 4 = new) and so on until the end of the sheet is reached.
My excel sheet is formatted thus:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Michael[/TD]
[TD]B[/TD]
[TD]Albatross[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Sarah[/TD]
[TD]D[/TD]
[TD]Borden[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]George[/TD]
[TD]R[/TD]
[TD]Martin[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Frank[/TD]
[TD]S[/TD]
[TD]Mint[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Louise[/TD]
[TD]L[/TD]
[TD]Peterson[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
</tbody>[/TABLE]
Each major is different by the way so it isn't copying the same data over and over again. At the end of the execution I need it to look like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Michael[/TD]
[TD]B[/TD]
[TD]Albatross[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Sarah[/TD]
[TD]D[/TD]
[TD]Borden[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Town[/TD]
[TD]State
[/TD]
[/TR]
[TR]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]George[/TD]
[TD]R[/TD]
[TD]Martin[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Frank [/TD]
[TD]S[/TD]
[TD]Mint[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Louise[/TD]
[TD]L[/TD]
[TD]Peterson[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any help would be greatly appreciated, it's for my university's honors graduation ceremony
My problem looks simple on paper, but I have no idea how to get a macro to do what I want it to do. Right now, I have it to the point where it will move the entire contents of a single row into column A, but I need it to move the contents of three columns, D, E, and F, row by row, into columns A, B, and C, underneath data that is currently in there. So it needs to create a new row under current data (row 1 = current, row 2 = new), move the current row D, E, F into that row, and move on to the next entry in D,E,F and move that into a new row under what would now be (row 3 = current, row 4 = new) and so on until the end of the sheet is reached.
My excel sheet is formatted thus:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Michael[/TD]
[TD]B[/TD]
[TD]Albatross[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Sarah[/TD]
[TD]D[/TD]
[TD]Borden[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]George[/TD]
[TD]R[/TD]
[TD]Martin[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Frank[/TD]
[TD]S[/TD]
[TD]Mint[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Louise[/TD]
[TD]L[/TD]
[TD]Peterson[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
</tbody>[/TABLE]
Each major is different by the way so it isn't copying the same data over and over again. At the end of the execution I need it to look like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Michael[/TD]
[TD]B[/TD]
[TD]Albatross[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Sarah[/TD]
[TD]D[/TD]
[TD]Borden[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Town[/TD]
[TD]State
[/TD]
[/TR]
[TR]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]George[/TD]
[TD]R[/TD]
[TD]Martin[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Frank [/TD]
[TD]S[/TD]
[TD]Mint[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Louise[/TD]
[TD]L[/TD]
[TD]Peterson[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Town[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Major[/TD]
[TD]Major[/TD]
[TD]Major[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any help would be greatly appreciated, it's for my university's honors graduation ceremony