Hi everyone, I've tried finding an answer to this on my own, but to no avail.
To sum up my problem, I'm trying to write a macro that could take the input data from Sheet2 (see below) and rearrange it so that it can be used for data import in Sheet1.
Name IDs would need to be repeated consecutively for the amount of skills present in the data in column 1, and in column 2, the skillsIDs would need to be transposed and pasted multiple times (#of names). The matching scores should then be added in column 3 as well. Please note that amount of data is variable, so it would be needed to have a way to make it dynamic.
The input is formatted like this (blank cells in the top left corner will always be that way):
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD]Skill 1[/TD]
[TD]Skill 2[/TD]
[TD]Skill 3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]s1[/TD]
[TD]s2[/TD]
[TD]s3[/TD]
[/TR]
[TR]
[TD]Name 1[/TD]
[TD]n1[/TD]
[TD]score1[/TD]
[TD]score2[/TD]
[TD]score3[/TD]
[/TR]
[TR]
[TD]Name 2[/TD]
[TD]n2[/TD]
[TD]score4[/TD]
[TD]score5[/TD]
[TD]score6[/TD]
[/TR]
[TR]
[TD]Name 3[/TD]
[TD]n3[/TD]
[TD]score7[/TD]
[TD]score8[/TD]
[TD]score9[/TD]
[/TR]
</tbody>[/TABLE]
This is how I would need the data to look like after the transformation (no need for names and skill names, only IDs):
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]n1[/TD]
[TD]s1[/TD]
[TD]score1[/TD]
[/TR]
[TR]
[TD]n1[/TD]
[TD]s2[/TD]
[TD]score2[/TD]
[/TR]
[TR]
[TD]n1[/TD]
[TD]s3[/TD]
[TD]score3[/TD]
[/TR]
[TR]
[TD]n2[/TD]
[TD]s1[/TD]
[TD]score4[/TD]
[/TR]
[TR]
[TD]n2[/TD]
[TD]s2[/TD]
[TD]score5[/TD]
[/TR]
[TR]
[TD]n2[/TD]
[TD]s3[/TD]
[TD]score6[/TD]
[/TR]
[TR]
[TD]n3[/TD]
[TD]s1[/TD]
[TD]score7[/TD]
[/TR]
[TR]
[TD]n3[/TD]
[TD]s2[/TD]
[TD]score8[/TD]
[/TR]
[TR]
[TD]n3[/TD]
[TD]s3[/TD]
[TD]score9[/TD]
[/TR]
</tbody>[/TABLE]
Let me know if you need more information on the problem!
Thanks in advance
To sum up my problem, I'm trying to write a macro that could take the input data from Sheet2 (see below) and rearrange it so that it can be used for data import in Sheet1.
Name IDs would need to be repeated consecutively for the amount of skills present in the data in column 1, and in column 2, the skillsIDs would need to be transposed and pasted multiple times (#of names). The matching scores should then be added in column 3 as well. Please note that amount of data is variable, so it would be needed to have a way to make it dynamic.
The input is formatted like this (blank cells in the top left corner will always be that way):
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD]Skill 1[/TD]
[TD]Skill 2[/TD]
[TD]Skill 3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]s1[/TD]
[TD]s2[/TD]
[TD]s3[/TD]
[/TR]
[TR]
[TD]Name 1[/TD]
[TD]n1[/TD]
[TD]score1[/TD]
[TD]score2[/TD]
[TD]score3[/TD]
[/TR]
[TR]
[TD]Name 2[/TD]
[TD]n2[/TD]
[TD]score4[/TD]
[TD]score5[/TD]
[TD]score6[/TD]
[/TR]
[TR]
[TD]Name 3[/TD]
[TD]n3[/TD]
[TD]score7[/TD]
[TD]score8[/TD]
[TD]score9[/TD]
[/TR]
</tbody>[/TABLE]
This is how I would need the data to look like after the transformation (no need for names and skill names, only IDs):
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]n1[/TD]
[TD]s1[/TD]
[TD]score1[/TD]
[/TR]
[TR]
[TD]n1[/TD]
[TD]s2[/TD]
[TD]score2[/TD]
[/TR]
[TR]
[TD]n1[/TD]
[TD]s3[/TD]
[TD]score3[/TD]
[/TR]
[TR]
[TD]n2[/TD]
[TD]s1[/TD]
[TD]score4[/TD]
[/TR]
[TR]
[TD]n2[/TD]
[TD]s2[/TD]
[TD]score5[/TD]
[/TR]
[TR]
[TD]n2[/TD]
[TD]s3[/TD]
[TD]score6[/TD]
[/TR]
[TR]
[TD]n3[/TD]
[TD]s1[/TD]
[TD]score7[/TD]
[/TR]
[TR]
[TD]n3[/TD]
[TD]s2[/TD]
[TD]score8[/TD]
[/TR]
[TR]
[TD]n3[/TD]
[TD]s3[/TD]
[TD]score9[/TD]
[/TR]
</tbody>[/TABLE]
Let me know if you need more information on the problem!
Thanks in advance