On 05/09/2020 03:33 AM, Claus Busch wrote:
Hi,
Am Fri, 8 May 2020 20:49:06 -0500 schrieb tb:
I need to extract part numbers from text strings that look like this:
Example 1:
J72 5-40 SOLENOID VALVE (there is a double space between J72
and SOLENOID)
Example 2:
SOLENOID VALVE K77 8-32 (there is a double space between VALVE
and K77)
Example 3:
SOLENOID VALVE _X37 1-22 X Y Z (there is an underscore before X37
and there are 2+ spaces between _X37 and whatever comes after that)
The formula that I am looking for would extract the part numbers as follows: >> Example 1: J72 5-40
Example 2: K77 8-32
Example 3: X37 1-22 (i.e. w/o the underscore and w/o whatever comes
after the 2+ spaces)
if there is always "SOLENOID VALVE" into the string, try:
=LEFT(TRIM(SUBSTITUTE(SUBSTITUTE(A1,"SOLENOID VALVE",),"_",)),8)
Regards
Claus B.
Thanks, Claus.
Unfortunately our parts have different descriptions...
I think that I can quickly reformat the parts like in Example 2 to
resemble those that are like Example 1.
For instance: Reformat "SOLENOID VALVE K77 8-32" to become "K77 8-32
SOLENOID VALVE". After that, I would need to be able to extract
whatever comes before the double space.
The problem then will be to also find a way to extract part numbers that
are between an underscore and double --or triple or quadruple, etc.--
space, like in Example 3.
What do you think? If I can reformat parts like those in Example 2 to
resemble those like in Example 1, would you then be able to help me with
a formula that extracts part numbers similar to Example 1 and Example 3?
Thanks.
--
tb
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)