View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Isolate text immediately preceding "("

Trina,

With your string in A1, enter this into B1

=LEFT(A1,FIND("(",A1)-2)

and this into C1 (format cell C1 as a date)
=--SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(MID(A1,FIND("(",A 1)+1,LEN(A1)),")",""),"DOB: ",""),"/",", ")

and then copy down to match your list.

Then copy and paste values to convert the formulas to values, and delete column A.

HTH,
Bernie
MS Excel MVP


"Tacrier" . wrote in message
...
I tried unsuccessfully to isolate text immediately preceding the "(" from a
text string into another cell using:

=MID(A1,SEARCH("(",A1) -20)

My text string contains a payee name followed by their date of birth like
this:

Smith, John (DOB: Dec 16/91)

I want to put the name into cell A1 and the DOB into B1, however I want to
do this for about 100 rows and each row has different text string lengths due
to the varying name lengths.

Any suggestions?

Thanking you in advance,
Trina