Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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?

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?

  • Author

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.

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

If there's always an " and " separating the names, then do a PatternCount() for it. Make sure to include the surrounding spaces to avoid false positives with names like Brandon.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.