Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
carricka
 
Posts: n/a
Default EXTRACT TEXT FROM TEXT STRING

Hi Folks -

Using Excel 2003, I'm looking for a formula, ultimately to mailmerge from
Word 2003, to extract a name from cells that contain a name and a number.
The names are of variable length as are the numbers. In all cases there is a
space between the name and the number.
Examples a
Anthony 2
Ber 12
Philomena 123.

I've looked at LEFT and RIGHT and TRIM but can't see any way to go left from
the space or right to the space.

Many thanks.
ANTHONY

  #2   Report Post  
Barb R.
 
Posts: n/a
Default

Try this:

=MID(A1,SEARCH(" ",A1,1)+1,LEN(A1)-SEARCH(" ",A1,1))

You could also parse the data using DATA - TEXT TO COLUMNS

"carricka" wrote:

Hi Folks -

Using Excel 2003, I'm looking for a formula, ultimately to mailmerge from
Word 2003, to extract a name from cells that contain a name and a number.
The names are of variable length as are the numbers. In all cases there is a
space between the name and the number.
Examples a
Anthony 2
Ber 12
Philomena 123.

I've looked at LEFT and RIGHT and TRIM but can't see any way to go left from
the space or right to the space.

Many thanks.
ANTHONY

  #3   Report Post  
Geoff Lord
 
Posts: n/a
Default

Try

=MID(A5,1,SEARCH(" ",A5))

Where text is in A5

Geoff


"carricka" wrote in message
...
Hi Folks -

Using Excel 2003, I'm looking for a formula, ultimately to mailmerge from
Word 2003, to extract a name from cells that contain a name and a number.
The names are of variable length as are the numbers. In all cases there

is a
space between the name and the number.
Examples a
Anthony 2
Ber 12
Philomena 123.

I've looked at LEFT and RIGHT and TRIM but can't see any way to go left

from
the space or right to the space.

Many thanks.
ANTHONY



  #4   Report Post  
carricka
 
Posts: n/a
Default

Hi Barb,

This gives me the number instead of the name. It's not what I want but is
most useful anyway. Geoff has supplied a formula that gives me the name.
Thanks very much for your time.

ANTHONY

"Barb R." wrote:

Try this:

=MID(A1,SEARCH(" ",A1,1)+1,LEN(A1)-SEARCH(" ",A1,1))

You could also parse the data using DATA - TEXT TO COLUMNS

"carricka" wrote:

Hi Folks -

Using Excel 2003, I'm looking for a formula, ultimately to mailmerge from
Word 2003, to extract a name from cells that contain a name and a number.
The names are of variable length as are the numbers. In all cases there is a
space between the name and the number.
Examples a
Anthony 2
Ber 12
Philomena 123.

I've looked at LEFT and RIGHT and TRIM but can't see any way to go left from
the space or right to the space.

Many thanks.
ANTHONY

  #5   Report Post  
carricka
 
Posts: n/a
Default

Hi Geoff -

Works perfectly, thanks.

ANTHONY

"Geoff Lord" wrote:

Try

=MID(A5,1,SEARCH(" ",A5))

Where text is in A5

Geoff


"carricka" wrote in message
...
Hi Folks -

Using Excel 2003, I'm looking for a formula, ultimately to mailmerge from
Word 2003, to extract a name from cells that contain a name and a number.
The names are of variable length as are the numbers. In all cases there

is a
space between the name and the number.
Examples a
Anthony 2
Ber 12
Philomena 123.

I've looked at LEFT and RIGHT and TRIM but can't see any way to go left

from
the space or right to the space.

Many thanks.
ANTHONY




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
Finding Specific Text in a Text String Peter Gundrum Excel Worksheet Functions 9 April 10th 05 07:21 PM
EXTRACT TEXT FROM A DATE Ronbo Excel Worksheet Functions 5 February 1st 05 07:39 AM
Extract text someone Excel Worksheet Functions 12 January 23rd 05 12:24 AM
Extract % from text string Mike Excel Worksheet Functions 5 December 1st 04 08:02 PM


All times are GMT +1. The time now is 08:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"