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

I have a similar problem. I have a name in cell A2. It will consist of Title,
Initials, Surname, e.g:

Mr A Bloggs
Mrs D P Smithers
Miss L Young

I need to separate the Title, Initials and Surname into 3 columns. Can you
suggest how this can be achieved, please? I clearly can't use Text to Columns
because the components are of variable length.

Thanks.

"ACarella" wrote:

Perfect. It worked.
Thank you.
Arlene

"Reitanos" wrote:

If what you mean is get the 2 characters to the left of the decimal,
but there might be more than 3 characters on the left you do this:
=MID(C4,FIND(".",C4)-2,2)
Basically, it locates the decimal and then uses its position to get
the other text.
If there will always be the same number of characters you can skip the
FIND part:
=MID(C4,2,2)

On May 22, 12:21 pm, ACarella
wrote:
Hi Makelei:

I have in cell C2 the following
H01.12345678

I need to extract the 2nd and 3rd character from the left of the decimal into
cell G2

Can you help?
thank you Arlene

"Makelei" wrote:
Hi,
I have in cell text as follows:
Text1 - Text2 - Text3

I need to get out Text2 in one cell and Text3 to another. What kinf of
formula I could use? Lenght of Text2 and Text3 varies, Text1 is always 3
characters.

Thanks in advance
MakeLei