View Single Post
  #18   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bollard bollard is offline
external usenet poster
 
Posts: 65
Default How to extract text from middle of a string

Hi Ron

We've put the formulae you gave into place and have since identfied one
problem. It's OK at identifying all the initials that occur between title and
surname, but it can't cope with people whose surname consists of 2 words or
more, that are not hyphenated, e.g.:

van Bommel
le Clerc
van den Bosch
de la Rue

Is there any way we can tweak the formula for the initials to recognise
strings as opposed to indiviudal initials? When it finds, for example, van
Bommel, it treats that surname as if 1 word.

Hope that all makes sense!

Thanks.

Keith

"Ron Rosenfeld" wrote:

On Sat, 28 Jun 2008 09:54:01 -0700, keithobro
wrote:

Hi Ron

For a moment there, I thought the middle formula wasn't going to work, then,
once I'd input the 3rd one, it all fell into place.

Marvellous.

Can't thank you enough.

Keith


You're welcome. Glad to help. Thanks for the feedback.

Of course, it is possible to make the "middle formula" stand alone by
substituting the formula that is in D2 for the D2 in the middle formula, but I
chose not to.

A stand-alone formula for the "middle":

=MID(A2,FIND(" ",A2)+1,FIND(CHAR(1),SUBSTITUTE(A2," ",CHAR(1),
LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))-FIND(" ",A2)-1)
--ron