Select Text in After Using Text to Columns

Dmichaud61

Board Regular
Joined
Mar 7, 2014
Messages
69
Office Version
  1. 2016
Platform
  1. Windows
Greetings! Is there a formula to fill down in column E with text from the first cell to the left that has text? The text in columns A through D are different lengths and could contain both text and numbers. I've a spreadsheet with more than 1900 rows. Thank you in advance.

[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]AAA[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]AAA[/TD]
[/TR]
[TR]
[TD]AAAB[/TD]
[TD]ATX[/TD]
[TD][/TD]
[TD][/TD]
[TD]ATX[/TD]
[/TR]
[TR]
[TD]BBB[/TD]
[TD]CCCCC[/TD]
[TD]DDDD[/TD]
[TD][/TD]
[TD]DDDD[/TD]
[/TR]
[TR]
[TD]1ADV[/TD]
[TD]CCC[/TD]
[TD]RNO[/TD]
[TD]XYZ1[/TD]
[TD]XYZ1[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
If a cell might contain only numbers, this would need modification but I read your comment as if a cell might contain text or text and numbers.

Excel Workbook
ABCDE
1AAAAAA
2AAABATXATX
3BBBCCCCCDDDDDDDD
41ADVCCCRNOXYZ1XYZ1
Last column



BTW, this could be achieved without doing the text to columns if we knew what the separator was.
 
Last edited:
Upvote 0
Thank you. Your formula worked on all cells that had only text. But i should have said that some cells contain numbers as well as text.
 
Upvote 0
The separator is always a forward slash "/". For example: AA/B/CCC/DE45/x2se. Thanks
 
Upvote 0
The separator is always a forward slash "/". For example: AA/B/CCC/DE45/x2se. Thanks
In that case try this on the original data before Text to Columns.

=SUBSTITUTE(RIGHT(SUBSTITUTE(A1,"/",REPT("/",50)),50),"/","")
 
Upvote 0
Could the formula be modified to select text between different bracket sets? For example just the text between the first, second, or third set of brackets starting from the left: AA/BBB/CCCCC/22232/44A. First set would be BBB, second would be CCCCC, and third 22232.
 
Upvote 0
Do you mean like this, copied across?


Book1
ABCDEF
1AA/BBB/CCCCC/22232/44AAABBBCCCCC2223244A
Extract sections
Cell Formulas
RangeFormula
B1=TRIM(MID(SUBSTITUTE($A1,"/",REPT(" ",50)),COLUMNS($B:B)*50-49,50))
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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