Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Hello everyone,
I have entries like this: ABC Company (FR 456721) BCD Company (UK 4521) ACD Company (France) (FR 56778) I would like to extract the code that is always two letters and then from 1 to 9 figures from between the brackets. The codes between brackets are always after the company name. Some company names have two sets of brackets such as the example above with France between brackets so I need to ignore that. Thanks very much for your valuable help, James |
#2
![]() |
|||
|
|||
![]()
=IF(LEN(A1)-LEN(SUBSTITUTE(A1,"(",""))1,MID(LEFT(A1,LEN
(A1)-1),FIND("(",A1,FIND("(",A1)+1)+1,999),MID(LEFT(A1, LEN (A1)-1),FIND("(",A1)+1,999)) HTH Jason Atlanta, GA -----Original Message----- Hello everyone, I have entries like this: ABC Company (FR 456721) BCD Company (UK 4521) ACD Company (France) (FR 56778) I would like to extract the code that is always two letters and then from 1 to 9 figures from between the brackets. The codes between brackets are always after the company name. Some company names have two sets of brackets such as the example above with France between brackets so I need to ignore that. Thanks very much for your valuable help, James . |
#3
![]() |
|||
|
|||
![]()
Works perfectly. Thanks Jason for your help.
James -----Original Message----- =IF(LEN(A1)-LEN(SUBSTITUTE(A1,"(",""))1,MID(LEFT(A1,LEN (A1)-1),FIND("(",A1,FIND("(",A1)+1)+1,999),MID(LEFT (A1,LEN (A1)-1),FIND("(",A1)+1,999)) HTH Jason Atlanta, GA -----Original Message----- Hello everyone, I have entries like this: ABC Company (FR 456721) BCD Company (UK 4521) ACD Company (France) (FR 56778) I would like to extract the code that is always two letters and then from 1 to 9 figures from between the brackets. The codes between brackets are always after the company name. Some company names have two sets of brackets such as the example above with France between brackets so I need to ignore that. Thanks very much for your valuable help, James . . |
#4
![]() |
|||
|
|||
![]()
On Thu, 3 Feb 2005 08:47:43 -0800, "James"
wrote: Hello everyone, I have entries like this: ABC Company (FR 456721) BCD Company (UK 4521) ACD Company (France) (FR 56778) I would like to extract the code that is always two letters and then from 1 to 9 figures from between the brackets. The codes between brackets are always after the company name. Some company names have two sets of brackets such as the example above with France between brackets so I need to ignore that. Thanks very much for your valuable help, James If the relevant code is the only thing that has the pattern of a bracket followed by two characters and a <space, then: =MID(A1,SEARCH("(?? ",A1)+1,SEARCH(")", MID(A1,SEARCH("(?? ",A1)+1,255))-1) --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
extracting contact info to a database | Excel Discussion (Misc queries) | |||
Extracting Values on one list and not another | Excel Discussion (Misc queries) | |||
Formula for Extracting Alphabetic Part of a Product Code | Excel Worksheet Functions | |||
extracting numbers with no more than 8-digits using advanced filtering | Excel Worksheet Functions | |||
extracting comments | Excel Worksheet Functions |