View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
rushdhih rushdhih is offline
external usenet poster
 
Posts: 9
Default How to extract specific text from a string of characters

here are some actual data from which the code needs to be extracted. As you
can see the code appears sometimes in the begining preceded by a semicolon,
in the middle or towards the end.

I have marked as 1,2,3 & 4 for clarity to show the possibilities

1)AP Accruals; A52101Battery 6 cell; A52101 Battery 6 cell; LKOC_RH_Toshiba
Re-Inv#3004461
2); ; A52101 Internet usage charges on Dialog USB Modem for December 2008;
3)AP Accruals; A52101 Internet usage charges; A52101 Internet usage charges
on Dialog USB Modem for December 2008; LKOC_RH_Dialog Internet-Dec 08
4)2008 PO ACCRUAL REVERSAL; ; A52101 PCB;

Thank you for any help you can give.



"Shane Devenshire" wrote:

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