Jump to content
Server Maintenance This Week. ×

Parsing a compound name


This topic is 1989 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I’m using the following formula to count the number of people in a compound name. If[WordCount(name)>2,2,1]. It gives the following results:

Name                          Result

Smith, Jane                    1

Smith, Jane and Joe       2

Smith, Jane Agnes          2

The last result is incorrect. It should be 1 since Jane Agnes is a first name.

What would be a correct formula to use?

Link to comment
Share on other sites

I am afraid these examples are not sufficient to determine what rules your data follows. I am guessing that "Smith-Jones, Adam" would also fail your test. The question is: what is unique to an entry of two (or more?) people? Will they always have the same last name? Will there always be an " and " separating their first names?

Link to comment
Share on other sites

What I'm trying to do is determine the number of people a name represents. In a name, both persons always have the same last name. There is always be an "and" separating the last and first names.

Generally, names are entered as" Jones, Mary" for one person, "Jones, Mary and John" for two persons. The problem arises when the first name is made up of two parts, a relatively rare occasion, but it does happen.

Link to comment
Share on other sites

Hi John,

When asking for help on parsing text, it is always best to provide actual examples of the data. There are so many variables that can effect the results.

In fact, a copy of the file is usually helpful.

Lee

Link to comment
Share on other sites

This topic is 1989 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.