Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
wahamler
 
Posts: n/a
Default searching for a space " "

I have a colum of data with names both first name and last. is there a
formula to pull out the first name and one to pull out the last name? a cell
might current read "John Smith" i want to separate the name so i have one
field reading "John" and the next field reading "Smith". The names will vary
in character length so i cannot use a simple left() command.
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Try this with the name in B5

First word
=IF(ISERR(FIND(" ",B5)),B5,IF(RIGHT(LEFT(B5,FIND(" ",B5)-1))=",",LEFT(B5,FIND(" ",B5)-2),LEFT(B5,FIND(" ",B5)-1)))

All except first word
=IF(ISERR(FIND(" ",B5)),"",MID(B5,FIND(" ",B5)+1,1024))

See also DateRefiner
http://www.rondebruin.nl/datarefiner.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"wahamler" wrote in message ...
I have a colum of data with names both first name and last. is there a
formula to pull out the first name and one to pull out the last name? a cell
might current read "John Smith" i want to separate the name so i have one
field reading "John" and the next field reading "Smith". The names will vary
in character length so i cannot use a simple left() command.



  #3   Report Post  
RagDyer
 
Posts: n/a
Default

What is the make-up of the majority of your data?

If you really have just 2 names, you can use TTC (Text To Columns), where an
"odd-ball" (von Dunst ) could be handled manually.

Check out the Help files for this function, which yields (returns) actual
data within the cells, and not formulas.
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



"wahamler" wrote in message
...
I have a colum of data with names both first name and last. is there a
formula to pull out the first name and one to pull out the last name? a

cell
might current read "John Smith" i want to separate the name so i have one
field reading "John" and the next field reading "Smith". The names will

vary
in character length so i cannot use a simple left() command.


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
Can I find and replace "white space" in a cell in Excel? biggyb75 Excel Worksheet Functions 7 July 11th 05 04:58 PM
Extra space after imported numbers Duane Excel Discussion (Misc queries) 1 May 26th 05 04:20 PM
space between text strings with concatenate Jeff Excel Discussion (Misc queries) 2 March 3rd 05 06:54 PM
Trim function doesn't clean out ASCII Code 160 (Space) Ronald Dodge Excel Worksheet Functions 6 January 27th 05 03:48 AM
Removing a space within a cell JERRY8 Excel Worksheet Functions 3 December 2nd 04 03:22 AM


All times are GMT +1. The time now is 10:03 PM.

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"