Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 48
Default return partial string

Hello experts,

I'm attempting to write a function that will return part of a name.

E.g., I have the name John Doe in cell A1. I want the cell B1 to
populate with "Doe."
I could use a number of functions that come to mind, but none that
would deal with different length strings.

E.g., I have the name John Smith in cell A2. I want the cell B2 to
populate with "Smith."

thanks for any help,
alex

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 772
Default return partial string

You could use a right/find combo but Data-text to columns Tab delemited with
space checked would be easier
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"alex" wrote:

Hello experts,

I'm attempting to write a function that will return part of a name.

E.g., I have the name John Doe in cell A1. I want the cell B1 to
populate with "Doe."
I could use a number of functions that come to mind, but none that
would deal with different length strings.

E.g., I have the name John Smith in cell A2. I want the cell B2 to
populate with "Smith."

thanks for any help,
alex


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default return partial string

One way ..

Assume names posted are representative, running in A1 down
In B1: =MID(TRIM(A1),SEARCH(" ",TRIM(A1))+1,99)
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"alex" wrote:
Hello experts,

I'm attempting to write a function that will return part of a name.

E.g., I have the name John Doe in cell A1. I want the cell B1 to
populate with "Doe."
I could use a number of functions that come to mind, but none that
would deal with different length strings.

E.g., I have the name John Smith in cell A2. I want the cell B2 to
populate with "Smith."

thanks for any help,
alex


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default return partial string

=RIGHT(A1,LEN(A1)-FIND(" ",A1))

"alex" wrote:

Hello experts,

I'm attempting to write a function that will return part of a name.

E.g., I have the name John Doe in cell A1. I want the cell B1 to
populate with "Doe."
I could use a number of functions that come to mind, but none that
would deal with different length strings.

E.g., I have the name John Smith in cell A2. I want the cell B2 to
populate with "Smith."

thanks for any help,
alex


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default return partial string

If you always want the last text string after the last space

=MID(A1,FIND("^^",SUBSTITUTE(A1," ","^^",LEN(A1)-LEN(SUBSTITUTE(A1,"
",""))))+1,256)


however if it is always just one space (if it is first space last) in the
cell you can use

=MID(A1,FIND(" ",A1)+1,256)



--
Regards,

Peo Sjoblom





"alex" wrote in message
oups.com...
Hello experts,

I'm attempting to write a function that will return part of a name.

E.g., I have the name John Doe in cell A1. I want the cell B1 to
populate with "Doe."
I could use a number of functions that come to mind, but none that
would deal with different length strings.

E.g., I have the name John Smith in cell A2. I want the cell B2 to
populate with "Smith."

thanks for any help,
alex





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 48
Default return partial string

On Jul 19, 11:06 am, "Peo Sjoblom" wrote:
If you always want the last text string after the last space

=MID(A1,FIND("^^",SUBSTITUTE(A1," ","^^",LEN(A1)-LEN(SUBSTITUTE(A1,"
",""))))+1,256)

however if it is always just one space (if it is first space last) in the
cell you can use

=MID(A1,FIND(" ",A1)+1,256)

--
Regards,

Peo Sjoblom

"alex" wrote in message

oups.com...



Hello experts,


I'm attempting to write a function that will return part of a name.


E.g., I have the name John Doe in cell A1. I want the cell B1 to
populate with "Doe."
I could use a number of functions that come to mind, but none that
would deal with different length strings.


E.g., I have the name John Smith in cell A2. I want the cell B2 to
populate with "Smith."


thanks for any help,
alex- Hide quoted text -


- Show quoted text -


Thank you all for your help...I'm excited to go test the suggestions.

alex

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
auto bold partial text in a string dave in Toronto Excel Discussion (Misc queries) 1 June 12th 07 01:07 PM
Partial String Match & Wild Cards Using VLOOKUP djDaemon Excel Worksheet Functions 0 March 9th 06 05:49 PM
Partial String Match Using VLOOKUP cdhmotes Excel Worksheet Functions 4 December 26th 05 10:26 PM
Partial String Rowan Drummond Excel Discussion (Misc queries) 3 December 18th 05 10:10 PM
Sumproduct - Return a String carlyman Excel Discussion (Misc queries) 5 July 27th 05 02:11 AM


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