MorgWalker
New Member
- Joined
- Aug 20, 2017
- Messages
- 2
Hi Everyone,
I'm trying to organize my data so that it can be used in a dependent dropdown list.
I can't figure out how to do this. I can't do it manually because there are 100+ rows that need to be converted. I've tried transposing it, as well as creating a pivot table, but neither option seems to work. I've googled other peoples macros in excel for similar situations, but everyone seems to have slightly different data or requirements than I do, so their code doesn't work for me.
My data is organized like this into two columns:
[TABLE="class: grid, width: 100, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]G[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]H[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]G[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
Each row has to be "flipped" so that each unique row in the first column becomes a header in a column, and all the data associated with it is listed under the header. Notice that some items such as "D" and "H" have no data associated with them, but I need them incorporated as well. Also notice that the data is not 1:1 (e.g. B,2 and G,2)
I need the data to be arranged like this:
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]7[/TD]
[TD]4[/TD]
[TD]8[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]9[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Is there a formula or a macro that can help arrange the data to be this way?
If anything is unclear, please let me know.
Thank you.
I'm trying to organize my data so that it can be used in a dependent dropdown list.
I can't figure out how to do this. I can't do it manually because there are 100+ rows that need to be converted. I've tried transposing it, as well as creating a pivot table, but neither option seems to work. I've googled other peoples macros in excel for similar situations, but everyone seems to have slightly different data or requirements than I do, so their code doesn't work for me.
My data is organized like this into two columns:
[TABLE="class: grid, width: 100, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]G[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]H[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]G[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
Each row has to be "flipped" so that each unique row in the first column becomes a header in a column, and all the data associated with it is listed under the header. Notice that some items such as "D" and "H" have no data associated with them, but I need them incorporated as well. Also notice that the data is not 1:1 (e.g. B,2 and G,2)
I need the data to be arranged like this:
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]7[/TD]
[TD]4[/TD]
[TD]8[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]9[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Is there a formula or a macro that can help arrange the data to be this way?
If anything is unclear, please let me know.
Thank you.