Remove the empty rows and display in another sheet

srsh911

New Member
Joined
Jul 14, 2016
Messages
4
[TABLE="width: 1088"]
<colgroup><col span="15"><col></colgroup><tbody>[TR]
[TD="colspan: 16"]I have a report data like the below in sheet 1[/TD]
[/TR]
[TR]
[TD]149502[/TD]
[TD="colspan: 15"] [/TD]
[/TR]
[TR]
[TD]149534[/TD]
[/TR]
[TR]
[TD]151229[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD]151235[/TD]
[/TR]
[TR]
[TD]151267[/TD]
[/TR]
[TR]
[TD]151301[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD]151337[/TD]
[/TR]
[TR]
[TD]155142[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD]155351[/TD]
[/TR]
[TR]
[TD]165620[/TD]
[/TR]
[TR]
[TD]169847[/TD]
[/TR]
[TR]
[TD]278985[/TD]
[/TR]
[TR]
[TD]112121[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD="colspan: 16"]And I would like to remove the empty rows between the cells and display in sheet 2 as below, the empty space may vary in all the reports. I don’t want it it VBA but in formulas.[/TD]
[/TR]
[TR]
[TD]149502[/TD]
[TD="colspan: 15"] [/TD]
[/TR]
[TR]
[TD]149534[/TD]
[/TR]
[TR]
[TD]151229[/TD]
[/TR]
[TR]
[TD]151235[/TD]
[/TR]
[TR]
[TD]151267[/TD]
[/TR]
[TR]
[TD]151301[/TD]
[/TR]
[TR]
[TD]151337[/TD]
[/TR]
[TR]
[TD]155142[/TD]
[/TR]
[TR]
[TD]155351[/TD]
[/TR]
[TR]
[TD]165620[/TD]
[/TR]
[TR]
[TD]169847[/TD]
[/TR]
[TR]
[TD]278985[/TD]
[/TR]
[TR]
[TD]112121[/TD]
[/TR]
</tbody>[/TABLE]
 
Or you could do something like this:


Book1
AB
1149502149502
2149534149534
3151229151229
4151235
5151235151267
6151267151301
7151301151337
8155142
9151337155351
10155142165620
11169847
12278985
13112121
14
15
16
17
18
19155351
20165620
21169847
22278985
23112121
Sheet1
Cell Formulas
RangeFormula
B1{=IFERROR(INDEX($A:$A,SMALL(IF($A:$A<>"",ROW($A:$A)),ROWS($B$1:$B1))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.


Not good on performance though: It would be better to replace $A:$A with the actual range of values (e.g. $A1:$A23 in this case).

WBD
 
Upvote 0

Forum statistics

Threads
1,226,853
Messages
6,193,370
Members
453,792
Latest member
Vic001

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