Stacking multiple columns into 2 columns - against a reference point

pupppish

New Member
Joined
Mar 20, 2019
Messages
3
Hi there, hoping someone can help me sort out a poorly formatted data-set which I've inherited and need to clean up to create some reports.

In short, the data-set extends out from column A to column A0, and has 435 rows.

Each row shows a unique 'case number' and then against each case number are pairs of tags of 'themes' and 'specific points', set out horizontally (see below - I've only added 3 pairs of tags for reference). In some cases there's only one pair of theme/specific point tags, whereas in others there are up to 20.

Rather than having these tag pairings extending out horizontally against the case number, I'd like to have them all stacked into two columns against their relevant case number.

So rather than it looking like this, as it does now:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Row 1[/TD]
[TD]Case number[/TD]
[TD]1. Theme[/TD]
[TD]1. Specific Point[/TD]
[TD]2. Theme[/TD]
[TD]2. Specific Point[/TD]
[TD]3. Theme[/TD]
[TD]3. Specific Point[/TD]
[/TR]
[TR]
[TD]Row 2[/TD]
[TD]00012[/TD]
[TD]Cost[/TD]
[TD]Too expensive[/TD]
[TD]Engineering[/TD]
[TD]Most viable route[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Row 3[/TD]
[TD]00016[/TD]
[TD]Socio-Economic[/TD]
[TD]Supports growth[/TD]
[TD]Cost[/TD]
[TD]Public spend[/TD]
[TD]Transport[/TD]
[TD]Improves connectivity[/TD]
[/TR]
[TR]
[TD]Row 4[/TD]
[TD]00019[/TD]
[TD]Engineering[/TD]
[TD]Shorter Route[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Row 5[/TD]
[TD]00056[/TD]
[TD]Cost[/TD]
[TD]Too expensive[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Row 6[/TD]
[TD]00058[/TD]
[TD]Transport[/TD]
[TD]Improve journey time[/TD]
[TD]Cost[/TD]
[TD]Too expensive[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


I'd like it to look like this:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Row 1[/TD]
[TD]Case number[/TD]
[TD]Theme[/TD]
[TD]Specific Point[/TD]
[/TR]
[TR]
[TD]Row 2[/TD]
[TD]00012[/TD]
[TD]Cost[/TD]
[TD]Too expensive[/TD]
[/TR]
[TR]
[TD]Row 3[/TD]
[TD]00012[/TD]
[TD]Engineering[/TD]
[TD]Most viable route[/TD]
[/TR]
[TR]
[TD]Row 4[/TD]
[TD]00016[/TD]
[TD]Socio-Economic[/TD]
[TD]Cost[/TD]
[/TR]
[TR]
[TD]Row 5[/TD]
[TD]00016[/TD]
[TD]Cost[/TD]
[TD]Public spend[/TD]
[/TR]
[TR]
[TD]Row 6[/TD]
[TD]00016[/TD]
[TD]Transport[/TD]
[TD]Improves connectivity[/TD]
[/TR]
[TR]
[TD]Row 7[/TD]
[TD]00019[/TD]
[TD]Engineering[/TD]
[TD]Shorter route[/TD]
[/TR]
[TR]
[TD]Row 8[/TD]
[TD]00056[/TD]
[TD]Cost[/TD]
[TD]Too expensive[/TD]
[/TR]
[TR]
[TD]Row 9[/TD]
[TD]00058[/TD]
[TD]Transport[/TD]
[TD]Improve journey time[/TD]
[/TR]
[TR]
[TD]Row 10[/TD]
[TD]00058[/TD]
[TD]Cost[/TD]
[TD]Too expensive[/TD]
[/TR]
</tbody>[/TABLE]

Appreciate any help with this!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
*Sorry, Row 4 for the proposed layout should instead read:
[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD]Row 4[/TD]
[TD]00016[/TD]
[TD]Socio-Economic[/TD]
[TD]Supports Growth[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top