Parsing Names in a table?

foxhound

Board Regular
Joined
Mar 21, 2003
Messages
182
Does anyone know how to parse a name into 6 parts: salutation, first, middle, last, pedigree and degree using code with no forms? I would like to take the results and put them into a temporary table then union it with the original table into a new table where the new columns “TITLE,” “FIRST,” “MIDDLE,” “LAST,” PEDGREE,” and “DEGREE” are added.

1. The names in my table are currently set up as follows:
Duck III, Donald Q.
Mouse, Minnie M
Rabbit Jr, Roger T.

2. What if the names are set up as follows?
Mr. Rolland B. Apple III, PHD

3. What if set up this way?
Denison Jr, SPHR, Mr. Marshall A

4. Is there a way to test for all of the above conditions and separate the same way not matter how the name is listed in the table?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
If this is a one time thing, then it can be done in excel and then imported back to Access. I'll let you know how.

If the table will be updated and you need to seperate the data on a regular basis, I know a query can be created, but I have to look into it a bit.

Let me know, I'm going out to lunch but will check the board for your response in about an hour.
 
Upvote 0
This information will be updated regularly with new names being added to the table. I looked through MSDN and found an article on how to parse names into multiple fields if the name is listed as shown in question #2 below. However, it requires using a form where only one name can be entered at a time.
 
Upvote 0
I have a couple of things to do at work.

But let me get you started, in the criteria of a query. You would use the Left, Mid and Right functions to seperate the field. You will also use the Len function to know where to seperate the field. So it would be something like: Left(len([field])).
 
Upvote 0
Thanks for the start :)

Hi. Are there any additional details that someone might be able to give? :D
 
Upvote 0

Forum statistics

Threads
1,221,519
Messages
6,160,295
Members
451,636
Latest member
ddweller151

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top