Selecting only parts of a string of text.

BlueDingo

New Member
Joined
Oct 19, 2009
Messages
42
Hello, I am after some help in separating parts of a string of text to go into separate columns.<o:p></o:p>
<o:p> </o:p>
Fortunately the spreadsheet is in the same format in relation to spaces and numbers of characters with the exception of the red text which can be any where between 2 and 50 characters.<o:p></o:p>
<o:p> </o:p>
I actually need AL46 to go to Col B, 001488616 into Col C, Valve, Pressure Equalizing, Gaseous into Col D and D03079/0002 into Col E.
<o:p> </o:p>
<o:p> </o:p>
<o:p> </o:p>
(65) AL46 ALSPO 0299999999 A20LS DISPOSALS.(001488616) Valve, Pressure Equalizing, Gaseous.D03079/0002<o:p></o:p>
<o:p> </o:p>
Thank you Gurus one and all,<o:p></o:p>
Regards, Pete<o:p></o:p>
 
OK, thanks for that, I'll accept the belt on the back on the head.

The following blue font, eg, 001488616 will not always be at the same location "as the text A20LS DISPOSAL can change to any number of characters".

 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Yes, we got that...

How about these questions?

For example, is the variable text A20LS DISPOSAL also a variable number of words? Does it always end in a period followed by an open parenthesis?

Also, a few more example text strings wouldn't hurt.

By the way, did my solution posted above work for you?
 
Upvote 0
As you can see by other row lines there are what one would expect in a logistics type environment:
(65) AL46 ALSPO 0299999999 A20LS DISPOSALS.(001488916) Valve, Pressure Equalizing, Gaseous.D03079/0002<o:p></o:p>
(69) AZ01 ALSPO G130 RAZH PROC 0799999999.(004901846) O-Ring.D13595/0001<o:p></o:p>
(6S) AT20 ALSPO H130HSIM AF 0299999999.(001898080) Thinner, Paint Products.E17030/0001


Your formula worked with some truncation, the third line resulted with the item name as "ner, Paint Products"

Again thank you.


<TBODY>
</TBODY>
 
Upvote 0
How about this:


Excel 2010
ABCDE
1(65) AL46 ALSPO 0299999999 A20LS DISPOSALS.(001488616) Valve, Pressure Equalizing, Gaseous.D03079/0002AL46001488616Valve, Pressure Equalizing, GaseousD03079/0002
2(69) AZ01 ALSPO G130 RAZH PROC 0799999999.(004901846) O-Ring.D13595/0001AZ01004901846O-RingD13595/0001
3(6S) AT20 ALSPO H130HSIM AF 0299999999.(001898080) Thinner, Paint Products.E17030/0001AT20001898080Thinner, Paint ProductsE17030/0001
Sheet4
Cell Formulas
RangeFormula
B1=MID(A1, 6, 4)
C1=MID(A1, SEARCH("^",SUBSTITUTE(A1,".","^",1))+2, 9)
D1=MID(A1,SEARCH("^",SUBSTITUTE(A1,") ","^",2))+2,SEARCH(".",REPLACE(A1,1,SEARCH("^",SUBSTITUTE(A1,") ","^",2))+2,"")))
E1=RIGHT(A1, 11)
 
Upvote 0

Forum statistics

Threads
1,221,811
Messages
6,162,114
Members
451,743
Latest member
matt3388

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