Shadefalcon
New Member
- Joined
- Feb 15, 2013
- Messages
- 21
Hey all,
I need help with a data transpose. If you check out what I pasted below for the first data set, you will see that I have columns for different attributes and values. Some attributes appear in different columns and their values are always to the right. What I want to do is transform this data to how it looks in the second variation - all of the attributes are listed across the top, and their values are associated underneath. Does anyone have a formula or macro that might help me achieve this?
Thanks,
M
[TABLE="width: 704"]
<colgroup><col style="width:48pt" span="11" width="64"> </colgroup><tbody>[TR]
[TD="class: xl64, width: 704, colspan: 11"]Initial Data[/TD]
[/TR]
[TR]
[TD="class: xl65"]Part #[/TD]
[TD="class: xl65"]Attribute 1[/TD]
[TD="class: xl65"]Value 1[/TD]
[TD="class: xl65"]Attribute 2[/TD]
[TD="class: xl65"]Value 2[/TD]
[TD="class: xl65"]Attribute 3[/TD]
[TD="class: xl65"]Value 3[/TD]
[TD="class: xl65"]Attribute 4[/TD]
[TD="class: xl65"]Value 4[/TD]
[TD="class: xl65"]Attribute 5[/TD]
[TD="class: xl65"]Value 5[/TD]
[/TR]
[TR]
[TD="class: xl65"]1[/TD]
[TD="class: xl65"]Brand[/TD]
[TD="class: xl65"]A[/TD]
[TD="class: xl65"]Type[/TD]
[TD="class: xl65"]A[/TD]
[TD="class: xl65"]Color[/TD]
[TD="class: xl65"]Red[/TD]
[TD="class: xl65"]Height[/TD]
[TD="class: xl65"]2[/TD]
[TD="class: xl65"]Amperage[/TD]
[TD="class: xl65"]10[/TD]
[/TR]
[TR]
[TD="class: xl65"]2[/TD]
[TD="class: xl65"]Brand[/TD]
[TD="class: xl65"]A[/TD]
[TD="class: xl65"]Type[/TD]
[TD="class: xl65"]B[/TD]
[TD="class: xl65"]Color[/TD]
[TD="class: xl65"]Blue[/TD]
[TD="class: xl65"]Height[/TD]
[TD="class: xl65"]3[/TD]
[TD="class: xl65"]Length[/TD]
[TD="class: xl65"]4[/TD]
[/TR]
[TR]
[TD="class: xl65"]3[/TD]
[TD="class: xl65"]Brand[/TD]
[TD="class: xl65"]A[/TD]
[TD="class: xl65"]Type[/TD]
[TD="class: xl65"]C[/TD]
[TD="class: xl65"]Height[/TD]
[TD="class: xl65"]3[/TD]
[TD="class: xl65"]Voltage[/TD]
[TD="class: xl65"]50[/TD]
[TD="class: xl65"]Length[/TD]
[TD="class: xl65"]5[/TD]
[/TR]
[TR]
[TD="class: xl65"]4[/TD]
[TD="class: xl65"]Brand[/TD]
[TD="class: xl65"]C[/TD]
[TD="class: xl65"]Color[/TD]
[TD="class: xl65"]Red[/TD]
[TD="class: xl65"]Height[/TD]
[TD="class: xl65"]3[/TD]
[TD="class: xl65"]Voltage[/TD]
[TD="class: xl65"]60[/TD]
[TD="class: xl65"]Style[/TD]
[TD="class: xl65"]B[/TD]
[/TR]
[TR]
[TD="class: xl65"]5[/TD]
[TD="class: xl65"]Brand[/TD]
[TD="class: xl65"]C[/TD]
[TD="class: xl65"]Color[/TD]
[TD="class: xl65"]Blue[/TD]
[TD="class: xl65"]Voltage[/TD]
[TD="class: xl65"]40[/TD]
[TD="class: xl65"]Amperage[/TD]
[TD="class: xl65"]10[/TD]
[TD="class: xl65"]Feed[/TD]
[TD="class: xl65"]J[/TD]
[/TR]
[TR]
[TD="class: xl65"]6[/TD]
[TD="class: xl65"]Brand[/TD]
[TD="class: xl65"]C[/TD]
[TD="class: xl65"]Color[/TD]
[TD="class: xl65"]Green[/TD]
[TD="class: xl65"]Voltage[/TD]
[TD="class: xl65"]60[/TD]
[TD="class: xl65"]Amperage[/TD]
[TD="class: xl65"]20[/TD]
[TD="class: xl65"]Feed[/TD]
[TD="class: xl65"]J[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 640"]
<colgroup><col style="width:48pt" span="10" width="64"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 640, colspan: 10"]How I Want it to Look Like After Transpose[/TD]
[/TR]
[TR]
[TD="class: xl67"]Part #[/TD]
[TD="class: xl67"]Amperage[/TD]
[TD="class: xl67"]Brand[/TD]
[TD="class: xl67"]Color[/TD]
[TD="class: xl67"]Feed[/TD]
[TD="class: xl67"]Height[/TD]
[TD="class: xl67"]Length[/TD]
[TD="class: xl67"]Style[/TD]
[TD="class: xl67"]Type[/TD]
[TD="class: xl67"]Voltage[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]1[/TD]
[TD="class: xl67, align: right"]10[/TD]
[TD="class: xl67"]A[/TD]
[TD="class: xl67"]Red[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67, align: right"]2[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]A[/TD]
[TD="class: xl67"] [/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]2[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]A[/TD]
[TD="class: xl67"]Blue[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67, align: right"]3[/TD]
[TD="class: xl67, align: right"]4[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]B[/TD]
[TD="class: xl67"] [/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]3[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]A[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67, align: right"]3[/TD]
[TD="class: xl67, align: right"]5[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]C[/TD]
[TD="class: xl67, align: right"]50[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]4[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]C[/TD]
[TD="class: xl67"]Red[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67, align: right"]3[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]B[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67, align: right"]60[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]5[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]C[/TD]
[TD="class: xl67"]Blue[/TD]
[TD="class: xl67"]J[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]6[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]C[/TD]
[TD="class: xl67"]Green[/TD]
[TD="class: xl67"]J[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[/TR]
</tbody>[/TABLE]
I need help with a data transpose. If you check out what I pasted below for the first data set, you will see that I have columns for different attributes and values. Some attributes appear in different columns and their values are always to the right. What I want to do is transform this data to how it looks in the second variation - all of the attributes are listed across the top, and their values are associated underneath. Does anyone have a formula or macro that might help me achieve this?
Thanks,
M
[TABLE="width: 704"]
<colgroup><col style="width:48pt" span="11" width="64"> </colgroup><tbody>[TR]
[TD="class: xl64, width: 704, colspan: 11"]Initial Data[/TD]
[/TR]
[TR]
[TD="class: xl65"]Part #[/TD]
[TD="class: xl65"]Attribute 1[/TD]
[TD="class: xl65"]Value 1[/TD]
[TD="class: xl65"]Attribute 2[/TD]
[TD="class: xl65"]Value 2[/TD]
[TD="class: xl65"]Attribute 3[/TD]
[TD="class: xl65"]Value 3[/TD]
[TD="class: xl65"]Attribute 4[/TD]
[TD="class: xl65"]Value 4[/TD]
[TD="class: xl65"]Attribute 5[/TD]
[TD="class: xl65"]Value 5[/TD]
[/TR]
[TR]
[TD="class: xl65"]1[/TD]
[TD="class: xl65"]Brand[/TD]
[TD="class: xl65"]A[/TD]
[TD="class: xl65"]Type[/TD]
[TD="class: xl65"]A[/TD]
[TD="class: xl65"]Color[/TD]
[TD="class: xl65"]Red[/TD]
[TD="class: xl65"]Height[/TD]
[TD="class: xl65"]2[/TD]
[TD="class: xl65"]Amperage[/TD]
[TD="class: xl65"]10[/TD]
[/TR]
[TR]
[TD="class: xl65"]2[/TD]
[TD="class: xl65"]Brand[/TD]
[TD="class: xl65"]A[/TD]
[TD="class: xl65"]Type[/TD]
[TD="class: xl65"]B[/TD]
[TD="class: xl65"]Color[/TD]
[TD="class: xl65"]Blue[/TD]
[TD="class: xl65"]Height[/TD]
[TD="class: xl65"]3[/TD]
[TD="class: xl65"]Length[/TD]
[TD="class: xl65"]4[/TD]
[/TR]
[TR]
[TD="class: xl65"]3[/TD]
[TD="class: xl65"]Brand[/TD]
[TD="class: xl65"]A[/TD]
[TD="class: xl65"]Type[/TD]
[TD="class: xl65"]C[/TD]
[TD="class: xl65"]Height[/TD]
[TD="class: xl65"]3[/TD]
[TD="class: xl65"]Voltage[/TD]
[TD="class: xl65"]50[/TD]
[TD="class: xl65"]Length[/TD]
[TD="class: xl65"]5[/TD]
[/TR]
[TR]
[TD="class: xl65"]4[/TD]
[TD="class: xl65"]Brand[/TD]
[TD="class: xl65"]C[/TD]
[TD="class: xl65"]Color[/TD]
[TD="class: xl65"]Red[/TD]
[TD="class: xl65"]Height[/TD]
[TD="class: xl65"]3[/TD]
[TD="class: xl65"]Voltage[/TD]
[TD="class: xl65"]60[/TD]
[TD="class: xl65"]Style[/TD]
[TD="class: xl65"]B[/TD]
[/TR]
[TR]
[TD="class: xl65"]5[/TD]
[TD="class: xl65"]Brand[/TD]
[TD="class: xl65"]C[/TD]
[TD="class: xl65"]Color[/TD]
[TD="class: xl65"]Blue[/TD]
[TD="class: xl65"]Voltage[/TD]
[TD="class: xl65"]40[/TD]
[TD="class: xl65"]Amperage[/TD]
[TD="class: xl65"]10[/TD]
[TD="class: xl65"]Feed[/TD]
[TD="class: xl65"]J[/TD]
[/TR]
[TR]
[TD="class: xl65"]6[/TD]
[TD="class: xl65"]Brand[/TD]
[TD="class: xl65"]C[/TD]
[TD="class: xl65"]Color[/TD]
[TD="class: xl65"]Green[/TD]
[TD="class: xl65"]Voltage[/TD]
[TD="class: xl65"]60[/TD]
[TD="class: xl65"]Amperage[/TD]
[TD="class: xl65"]20[/TD]
[TD="class: xl65"]Feed[/TD]
[TD="class: xl65"]J[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 640"]
<colgroup><col style="width:48pt" span="10" width="64"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 640, colspan: 10"]How I Want it to Look Like After Transpose[/TD]
[/TR]
[TR]
[TD="class: xl67"]Part #[/TD]
[TD="class: xl67"]Amperage[/TD]
[TD="class: xl67"]Brand[/TD]
[TD="class: xl67"]Color[/TD]
[TD="class: xl67"]Feed[/TD]
[TD="class: xl67"]Height[/TD]
[TD="class: xl67"]Length[/TD]
[TD="class: xl67"]Style[/TD]
[TD="class: xl67"]Type[/TD]
[TD="class: xl67"]Voltage[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]1[/TD]
[TD="class: xl67, align: right"]10[/TD]
[TD="class: xl67"]A[/TD]
[TD="class: xl67"]Red[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67, align: right"]2[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]A[/TD]
[TD="class: xl67"] [/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]2[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]A[/TD]
[TD="class: xl67"]Blue[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67, align: right"]3[/TD]
[TD="class: xl67, align: right"]4[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]B[/TD]
[TD="class: xl67"] [/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]3[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]A[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67, align: right"]3[/TD]
[TD="class: xl67, align: right"]5[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]C[/TD]
[TD="class: xl67, align: right"]50[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]4[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]C[/TD]
[TD="class: xl67"]Red[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67, align: right"]3[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]B[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67, align: right"]60[/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]5[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]C[/TD]
[TD="class: xl67"]Blue[/TD]
[TD="class: xl67"]J[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[/TR]
[TR]
[TD="class: xl67, align: right"]6[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"]C[/TD]
[TD="class: xl67"]Green[/TD]
[TD="class: xl67"]J[/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl67"] [/TD]
[/TR]
</tbody>[/TABLE]