Converting multiple rows into single column

karti1986

Board Regular
Joined
Jun 24, 2014
Messages
60
Hi Folks

I have a requirement where multiple rows to be placed in a single column one below another. The Rows&columns are dynamic(need not be the same number of rows and columns). Is there anyway we can do this with the help of a Macro/Formula? with my current knowledge its apart from my reach.. Appreciate any help!! thanks in advance. :)

raw dump:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]John[/TD]
[TD]Mike[/TD]
[TD]Jose[/TD]
[/TR]
[TR]
[TD]Bill[/TD]
[TD]Tom[/TD]
[TD]Dave[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

expected Format:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]John
[/TD]
[/TR]
[TR]
[TD]Bill[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[/TR]
[TR]
[TD]Jose[/TD]
[/TR]
[TR]
[TD]Dave[/TD]
[/TR]
</tbody>[/TABLE]

Regards
KG
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi Folks

I have a requirement where multiple rows to be placed in a single column one below another. The Rows&columns are dynamic(need not be the same number of rows and columns). Is there anyway we can do this with the help of a Macro/Formula? with my current knowledge its apart from my reach.. Appreciate any help!! thanks in advance. :)

raw dump:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]John[/TD]
[TD]Mike[/TD]
[TD]Jose[/TD]
[/TR]
[TR]
[TD]Bill[/TD]
[TD]Tom[/TD]
[TD]Dave[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

expected Format:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]John[/TD]
[/TR]
[TR]
[TD]Bill[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[/TR]
[TR]
[TD]Jose[/TD]
[/TR]
[TR]
[TD]Dave[/TD]
[/TR]
</tbody>[/TABLE]

Regards
KG

Assume your source data range is A1:B2. Here is your formula. Use Cntrl-
Shift-Enter. Enter formula in A4 copy down

[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"] =INDEX($A$1:$B$2,MOD(SMALL(IF($A$1:$B$2<>"",(COLUMN($A$1:$B$2)-COLUMN($A$1)+1)*10^9+ROW($A$1:$B$2)-ROW($A$1)+1),ROWS($A$4:A4)),10^9),INT(SMALL(IF($A$1:$B$2<>"",(COLUMN($A$1:$B$2)-COLUMN($A$1)+1)*10^9+ROW($A$1:$B$2)-ROW($A$1)+1),ROWS($A$4:A4))/10^9))[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,226,220
Messages
6,189,697
Members
453,565
Latest member
Mukundan

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