Hello,
I need some help reformatting some files I've been receiving. The files need to be "transposed"? in such a way to be uploaded by one of the systems I use but it's been taking me forever to do this manually and I'm hoping there's some type of simpler solution. I have been using a series of macros to handle other tasks so I would prefer a similar solution, if possible.
An item of note is that the input that I received is not always 100% the same. For example, We always receive the member ID, however, we only occasionally receive that members name and source/identifier. So this solution should account for the potential to have blank columns.
I've tried pivot tables, and being creative with the Paste Special Transpose feature, but no luck in getting close to what I need.
Input:
[TABLE="class: grid, width: 711"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Source[/TD]
[TD]AAAA[/TD]
[TD]BBBB[/TD]
[TD]CCCC[/TD]
[TD]DDDD[/TD]
[TD]EEEE[/TD]
[TD]FFFF[/TD]
[TD]GGGG[/TD]
[TD]HHHH[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]65[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]30[/TD]
[/TR]
[TR]
[TD="align: right"]333333333[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]16[/TD]
[/TR]
[TR]
[TD="align: right"]444444444[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="align: right"]555555555[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]20[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]20[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]666666666[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]100[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]777777777[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]100[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]888888888[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]100[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]999999999[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Output: I only showed the first two members, but the pattern would continue for the remainder. The output was sorted by Member ID, then Project.
[TABLE="class: grid, width: 219"]
<tbody>[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]AAAA[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]BBBB[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]CCCC[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]DDDD[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]EEEE[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]FFFF[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]GGGG[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]HHHH[/TD]
[TD="align: right"]65[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]AAAA[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]BBBB[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]CCCC[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]DDDD[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]EEEE[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]FFFF[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]GGGG[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]HHHH[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]AAAA[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]BBBB[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]CCCC[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]DDDD[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]EEEE[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]FFFF[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]GGGG[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]HHHH[/TD]
[TD="align: right"]30[/TD]
[/TR]
</tbody>[/TABLE]
Thanks,
BS
I need some help reformatting some files I've been receiving. The files need to be "transposed"? in such a way to be uploaded by one of the systems I use but it's been taking me forever to do this manually and I'm hoping there's some type of simpler solution. I have been using a series of macros to handle other tasks so I would prefer a similar solution, if possible.
An item of note is that the input that I received is not always 100% the same. For example, We always receive the member ID, however, we only occasionally receive that members name and source/identifier. So this solution should account for the potential to have blank columns.
I've tried pivot tables, and being creative with the Paste Special Transpose feature, but no luck in getting close to what I need.
Input:
[TABLE="class: grid, width: 711"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Source[/TD]
[TD]AAAA[/TD]
[TD]BBBB[/TD]
[TD]CCCC[/TD]
[TD]DDDD[/TD]
[TD]EEEE[/TD]
[TD]FFFF[/TD]
[TD]GGGG[/TD]
[TD]HHHH[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]65[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]30[/TD]
[/TR]
[TR]
[TD="align: right"]333333333[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]16[/TD]
[/TR]
[TR]
[TD="align: right"]444444444[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="align: right"]555555555[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]20[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]20[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]666666666[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]100[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]777777777[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]100[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]888888888[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]100[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]999999999[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Output: I only showed the first two members, but the pattern would continue for the remainder. The output was sorted by Member ID, then Project.
[TABLE="class: grid, width: 219"]
<tbody>[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]AAAA[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]BBBB[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]CCCC[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]DDDD[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]EEEE[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]FFFF[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]GGGG[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD]HHHH[/TD]
[TD="align: right"]65[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]AAAA[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]BBBB[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]CCCC[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]DDDD[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]EEEE[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]FFFF[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]GGGG[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]111111111[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD]HHHH[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]AAAA[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]BBBB[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]CCCC[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]DDDD[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]EEEE[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]FFFF[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]GGGG[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]222222222[/TD]
[TD][/TD]
[TD][/TD]
[TD]HHHH[/TD]
[TD="align: right"]30[/TD]
[/TR]
</tbody>[/TABLE]
Thanks,
BS