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.

ABCDE
AAAAAA
AAABATXATX
BBBCCCCCDDDDDDDD
1ADVCCCRNOXYZ1XYZ1

<tbody>
</tbody>
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
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,215,497
Messages
6,125,160
Members
449,209
Latest member
BakerSteve

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