PC Review


Reply
Thread Tools Rate Thread

Another Method for Parsing Names

 
 
George Nicholson
Guest
Posts: n/a
 
      18th Oct 2007
> It works for all variables except for names with more than one middle
> initial.


Jr., Sr., III, Esq., Phd, MBA, CEO....





"Jim Berglund" <(E-Mail Removed)> wrote in message
news:811E3DD6-D1FF-4904-841C-(E-Mail Removed)...
> Having bothered others with ways of parsing names, I thought I'd at lease
> contribute a simple solution for doing the complete job...
>
> Assume you have names of the following types in column C
>
> Mrs Dorothy Hannity
>
> Dr P R Rogers
>
> Dana Delany
>
> Mr Bradley K Pitts
>
> Type the following formulas into the specified cells:
>
> O1=FIND(" ",C1)
> Determines the location/existence of the blank following the Salutaton
> or First Name
>
> P1=FIND(" ",C1,FIND(" ",C1)+1)
> Determines the location/existence of the blank following the First
> Name or Middle Initial(MI)
>
> Q1=FIND(" ",R1)
> Determines the location/existence of the blank following the Middle
> Initial in the next, adjacent cell
>
> R1=IF(ISERROR(P1),RIGHT(C1,LEN(C1)-O1),RIGHT(C1,LEN(C1)-P1))
> Defines the Last Name or MI/LN if there is a MI
>
> S1=LEFT(C1,O1-1)
> Creates the Salutation column
>
> T1=IF(ISERROR(S1)," ",MID(C1,O1+1,P1-O1))
> Creates the First Name column
>
> U1=IF(FIND(" ",R1)=2,LEFT(R1,1),"")
> Creates the MI column
>
> V1=IF(U1<>"",MID(R1,FIND(" ",R1)+1,99),R1)
> Creates the Last Name column
>
>
> Fill the entries down and then copy the resulting values into another set
> of columns.
>
> It works for all variables except for names with more than one middle
> initial.
>



 
Reply With Quote
 
 
 
 
Jim Berglund
Guest
Posts: n/a
 
      18th Oct 2007
Having bothered others with ways of parsing names, I thought I'd at lease
contribute a simple solution for doing the complete job...

Assume you have names of the following types in column C

Mrs Dorothy Hannity

Dr P R Rogers

Dana Delany

Mr Bradley K Pitts

Type the following formulas into the specified cells:

O1=FIND(" ",C1)
Determines the location/existence of the blank following the Salutaton
or First Name

P1=FIND(" ",C1,FIND(" ",C1)+1)
Determines the location/existence of the blank following the First Name
or Middle Initial(MI)

Q1=FIND(" ",R1)
Determines the location/existence of the blank following the Middle
Initial in the next, adjacent cell

R1=IF(ISERROR(P1),RIGHT(C1,LEN(C1)-O1),RIGHT(C1,LEN(C1)-P1))
Defines the Last Name or MI/LN if there is a MI

S1=LEFT(C1,O1-1)
Creates the Salutation column

T1=IF(ISERROR(S1)," ",MID(C1,O1+1,P1-O1))
Creates the First Name column

U1=IF(FIND(" ",R1)=2,LEFT(R1,1),"")
Creates the MI column

V1=IF(U1<>"",MID(R1,FIND(" ",R1)+1,99),R1)
Creates the Last Name column


Fill the entries down and then copy the resulting values into another set of
columns.

It works for all variables except for names with more than one middle
initial.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Parsing names Rick Rothstein Microsoft Excel Programming 2 26th May 2011 05:55 PM
Another Method for Parsing Names George Nicholson Microsoft Excel Discussion 1 18th Oct 2007 09:21 PM
Parsing Names Alan B. Densky Microsoft Access Queries 6 18th Jun 2007 06:14 PM
Parsing names Hanksor Microsoft Access Queries 1 25th Mar 2004 10:52 PM
parsing dir names adrin Microsoft C# .NET 3 16th Feb 2004 09:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:22 AM.