Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Parsing Full Names of varying lenths and parts

I am attempting to parse a Full name that includes First,
Middle, Last and some times PHD, MR or MRS.

I have the first name that was a left with a nested search
but search only works from left to right. I would like to
use right and some function that counts number of chactors
until reaching the space to the left of the last name.

Any Idea?s
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Parsing Full Names of varying lenths and parts

If you using excel 2000 or later, you can use the split command to put each
part of the name into an array

varr = split("John Winston Smith PHD")
? varr(0)
John
? varr(1)
Winston
? varr(2)
Smith
? varr(3)
PHD

so you could always check the last element of the array

titlecandidate = varr(ubound(varr))

If you don't want to use that, look at instrRev
sStr = "John Winston Smith PHD"
? Right(sStr,len(sStr)-instrRev(sStr," "))
PHD

Again, this requires xl2000 or later.

--
Regards,
Tom Ogilvy

"Dan" wrote in message
...
I am attempting to parse a Full name that includes First,
Middle, Last and some times PHD, MR or MRS.

I have the first name that was a left with a nested search
but search only works from left to right. I would like to
use right and some function that counts number of chactors
until reaching the space to the left of the last name.

Any Idea?s



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
parsing a full name out into Last, First, Middle Craig Excel Worksheet Functions 2 July 29th 09 12:57 AM
lookup needed for names in varying order alicatnj Excel Worksheet Functions 2 March 28th 08 05:05 PM
Extracting parts of names klysell Excel Worksheet Functions 6 May 3rd 07 07:17 PM
Formulas for Parsing Full names jonefer Excel Worksheet Functions 3 February 14th 06 06:28 AM
how do I find names in a workbook full of names aj Excel Discussion (Misc queries) 1 January 19th 06 09:01 PM


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