Removing text from a column

cluettp

New Member
Joined
Nov 7, 2019
Messages
2
Hello

I have a long column of text with some gaps; here's an example of what I mean:

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Monday[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Friday[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Saturday[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Sunday[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]etc etc[/TD]
[/TR]
</tbody>[/TABLE]

If there a formula I can place in column B which just shows

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Monday[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Friday[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Saturday[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Sunday[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Thanks for reading.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi. Enter this into B1 using CTRL-SHIFT-ENTER

=IFERROR(INDEX($A$1:$A$100,SMALL(IF($A$1:$A$100<>"",ROW($A$1:$A$100)-ROW($A$1)+1),ROWS($A$1:A1))),"")
 
Upvote 0
In cell B1;

Code:
=IFERROR(INDEX($A:$A,SMALL(IF(ISTEXT($A:$A),ROW($A:$A),""),ROW(A2))),"")

It's an array formula so you'll need to press CTRL, SHIFT and ENTER to complete it properly, of done right you'll wrap it in { }

Drag down and it should do what you want :)
 
Upvote 0
In cell B1;

Code:
=IFERROR(INDEX($A:$A,SMALL(IF(ISTEXT($A:$A),ROW($A:$A),""),ROW(A2))),"")

It's an array formula so you'll need to press CTRL, SHIFT and ENTER to complete it properly, of done right you'll wrap it in { }

Drag down and it should do what you want :)

__________________

Thanks to all,

Steve the Fishes formula worked a treat; I found problems with JazzSP8's.

Someday I would like to understand how it works!
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,150
Members
453,021
Latest member
Justyna P

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