Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Get Title, Forename(s) and Surname

Hello Everyone,

I have got a field that has the full name of a person.

I am basically looking for a code (or ideas) to get the Title,
Forname(s) and Surname from the supplied full name.

Some examples:
1. Input: Mr Lucas
Output:
Title: "Mr"
Forename: ""
Surname: "Lucas"

2. Input: John Lucas
Output:
Title: ""
Forename: "John"
Surname: "Lucas"

3. Input: John Lewis Lucas
Output:
Title: ""
Forename: "John Lewis"
Surname: "Lucas"

4. Input: Mr John Lucas
Output:
Title: "Mr"
Forename: "John"
Surname: "Lucas"

5. Input: Mr John Lewis Lucas
Output:
Title: "Mr"
Forename: "John Lewis"
Surname: "Lucas"

Can someone suggest some ideas of it would be great if you have a code
that I can use.

Many Thanks,
Nevaank

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Get Title, Forename(s) and Surname

I am thinking you could split on the space delimiter and then post from right
to left.
surname would always be the extreme right. The tricky part is breaking the
title out. I suppose that would have to be by exception, like If item = mr.
Or if item = ms. Then post to extreme left field. Figuring this out could
keep you busy for a while.

" wrote:

Hello Everyone,

I have got a field that has the full name of a person.

I am basically looking for a code (or ideas) to get the Title,
Forname(s) and Surname from the supplied full name.

Some examples:
1. Input: Mr Lucas
Output:
Title: "Mr"
Forename: ""
Surname: "Lucas"

2. Input: John Lucas
Output:
Title: ""
Forename: "John"
Surname: "Lucas"

3. Input: John Lewis Lucas
Output:
Title: ""
Forename: "John Lewis"
Surname: "Lucas"

4. Input: Mr John Lucas
Output:
Title: "Mr"
Forename: "John"
Surname: "Lucas"

5. Input: Mr John Lewis Lucas
Output:
Title: "Mr"
Forename: "John Lewis"
Surname: "Lucas"

Can someone suggest some ideas of it would be great if you have a code
that I can use.

Many Thanks,
Nevaank


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Get Title, Forename(s) and Surname

Hello JLGWhiz,

I knew someone would ask me about the title. I tried looking for all
types of titles on the net, but unfortunately, couldn't find any. I
feel if I am writing/getting code then it should be a generalised one.
I thought someone might have definitely come across something like
this before. So was expecting few answers.

Thanks for the info you have given.

Is there anyone who can direct me to some links that would give me
list of titles. Basically in the project that I am doing the name
field has the name of shareholders. The titles that I have seen are
Mr, Mrs, Miss, Ms, Captain, Dr and Hon.

Many Thanks,
Nevaank

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
Sorting by surname when first name and surname are in the same cel Louise New Users to Excel 3 April 5th 23 02:50 PM
Split first name and Surname Newman Emanouel Excel Programming 2 September 13th 07 02:40 PM
Change around surname and name kassie Excel Discussion (Misc queries) 8 June 10th 07 07:01 AM
Named range=Column title,comumn title in cellB6 use B6in equation Graham Excel Discussion (Misc queries) 2 July 21st 06 10:03 AM
Name Surname combination Seaman Excel Programming 2 June 11th 05 09:23 AM


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