View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default How to extract specific text from a string of characters

Why don't you show us a few examples, technically this could be

A52101
A52101A52101
zzzA52101
dfsdsafdsa A52101 amb
asA52101bcdA52101
B123456787vA52101dsfdsf

How can you tell all these apart? How can you tell which 6 digit code is
really a code as in the last example?

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"rushdhih" wrote:

In order to meet client reporting requirements, we download data from our ERP
system into Excel. Our ERP system has limitations and to overcome this we
have codified client budget data. Every transaction description field entered
into the ERP system includes a 6 digit code (Eg:A52101). The problem I am
encountering in the downloaded data is there are system generated text and
other spurious text that creeps in during the conversion process. The code
appears sometime in the left, right or center of the transaction description
together with other text.

I need a formula that will check through the transaction description and
extract only the first occurence of the code.

The pattern of the code - Alpha + 5 Numeric character (no spaces)


Thank you in advance for your help