View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tb tb is offline
external usenet poster
 
Posts: 84
Default Extraction of Part Numbers from Text Strings

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)

Could somebody please help? Would prefer an Excel formula rather than a
macro.

Thanks.
--
tb