Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sorting by surname when first name and surname are in the same cel | New Users to Excel | |||
Split first name and Surname | Excel Programming | |||
Change around surname and name | Excel Discussion (Misc queries) | |||
Named range=Column title,comumn title in cellB6 use B6in equation | Excel Discussion (Misc queries) | |||
Name Surname combination | Excel Programming |