Jump to content
Server Maintenance This Week. ×

Extract last word in field


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

Recommended Posts

Hello,

I'm struggling with trying to extract the last word in a field, so that I can then extract the first initial of that last word.

Someone else set up a name field that contains a persons full name rather than separate FirstName, MiddleName, LastName fields. (Some entries have 2 words some have 3). Example:

Mary Eileen Jones

Jane Smithson

In the end I want to get the initials of the person's first and last names. Thus, MJ or JS from the above example.

I had hoped Last function would work but it doesn't. It gave me all three words in Mary Eileen Jones.

I've managed to extract all kinds of thing with different, but not the last word's first initial.

Please help :bang:

thanks

Jana

Link to comment
Share on other sites

I think it's the "Left(Right" part of the calculation that makes it easy to misinterpret.

If the Name fields are consistent enetered then using Left(MyTable::Name; 1) would work for the first initial. Of course I can see other potential problems like a user typing in a Name as "Smith, John A." or "Mr. John A. Smith".

Link to comment
Share on other sites

This topic is 6195 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.