#1   Report Post  
Access Front End
 
Posts: n/a
Default String

Hi Anyone!

How do you FIND a string in a cell. I know that in C language you can use
"string" but what do you use in Excel. I have a cell that contain First name
then comma some time a space then Last Name. How can I get the Firstname in
one column & Last name in one column by using the formula. Thanks

Ngan
  #2   Report Post  
Kevin Lehrbass
 
Posts: n/a
Default

Hi Ngan,

I have a free download on my website which shows you have to do this. There
are also many other excel websites with text formulas and text downloads. Do
a search "excel separate lastname, firstname".

Cheers,
--
Kevin Lehrbass
www.spreadsheetsolutions4u.com


"Access Front End" wrote:

Hi Anyone!

How do you FIND a string in a cell. I know that in C language you can use
"string" but what do you use in Excel. I have a cell that contain First name
then comma some time a space then Last Name. How can I get the Firstname in
one column & Last name in one column by using the formula. Thanks

Ngan

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

=LEFT(A1,Find(" ",A1)-1)
and
=RIGHT(A1,LEN(A1)-FIND(" ",A1)-1)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Access Front End" wrote in
message ...
Hi Anyone!

How do you FIND a string in a cell. I know that in C language you can use
"string" but what do you use in Excel. I have a cell that contain First

name
then comma some time a space then Last Name. How can I get the Firstname

in
one column & Last name in one column by using the formula. Thanks

Ngan



  #4   Report Post  
Kevin Lehrbass
 
Posts: n/a
Default

Hi Again,

I found the formula for you.
Extract last word: =RIGHT(A1,LEN(A1)-FIND(" ",A1,1))
Extract first word: =LEFT(A1,FIND(" ",A1)-2)


--
Kevin Lehrbass
www.spreadsheetsolutions4u.com


"Access Front End" wrote:

Hi Anyone!

How do you FIND a string in a cell. I know that in C language you can use
"string" but what do you use in Excel. I have a cell that contain First name
then comma some time a space then Last Name. How can I get the Firstname in
one column & Last name in one column by using the formula. Thanks

Ngan

  #5   Report Post  
B. R.Ramachandran
 
Posts: n/a
Default

Hi,

If a comma separates the first and last names, and also some entires contain
a space after the comma, use the following formulas in B1 and C1 to extract
the first and last parts respectively (change the 'A1's appropriately).

=LEFT(A1,FIND(",",A1)-1)
=TRIM(RIGHT(A1,LEN(A1)-FIND(",",A1)))


Regards,
B. R. Ramachandran



"Access Front End" wrote:

Hi Anyone!

How do you FIND a string in a cell. I know that in C language you can use
"string" but what do you use in Excel. I have a cell that contain First name
then comma some time a space then Last Name. How can I get the Firstname in
one column & Last name in one column by using the formula. Thanks

Ngan



  #6   Report Post  
Access Front End
 
Posts: n/a
Default

Thank You ALL

Ngan

"B. R.Ramachandran" wrote:

Hi,

If a comma separates the first and last names, and also some entires contain
a space after the comma, use the following formulas in B1 and C1 to extract
the first and last parts respectively (change the 'A1's appropriately).

=LEFT(A1,FIND(",",A1)-1)
=TRIM(RIGHT(A1,LEN(A1)-FIND(",",A1)))


Regards,
B. R. Ramachandran



"Access Front End" wrote:

Hi Anyone!

How do you FIND a string in a cell. I know that in C language you can use
"string" but what do you use in Excel. I have a cell that contain First name
then comma some time a space then Last Name. How can I get the Firstname in
one column & Last name in one column by using the formula. Thanks

Ngan

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
Looking up a string of text within a string of text tobriant Excel Worksheet Functions 4 September 20th 05 06:59 PM
Auto convert an alphanumeric string (CIS9638S) to numbers only? Gary L Brown Excel Worksheet Functions 1 September 7th 05 01:17 AM
Inserting Filtered RC cell information into other worksheets Dennis Excel Discussion (Misc queries) 10 July 30th 05 01:54 AM
How do I use 3 cells to create the string for a lookup function? Bencomo Excel Worksheet Functions 1 May 15th 05 07:17 AM
Finding Specific Text in a Text String Peter Gundrum Excel Worksheet Functions 9 April 10th 05 07:21 PM


All times are GMT +1. The time now is 10:22 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"