Jump to content

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

Recommended Posts

  • Newbies
Posted

Hi all-

I'm trying to take 4 fields (Prefix, FirstName, MiddleInitial, LastName) and combine them into 1 field "WholeName." Below is my calc:

If(Prefix <> " " and MiddleInitial <> " ", Prefix & " " & FirstName & " " & MiddleInitial & " " & LastName, If(Prefix <> " " and MiddleInitial = " ", Prefix & " " & FirstName & " " & LastName, If(Prefix = " " and MiddleInitial <> " ", FirstName & " " & MiddleInitial & " " & LastName, If(Prefix = " " and MiddleInitial = " ", FirstName & " " & LastName, "Check This Contact Name"))))

It ends up returning a space before the first name if there is no prefix and spaces in the middle if there is no middle initial. What am I doing wrong?

Thanks for any help.

Posted

Hi Poster:

Try this calculation,

Case(not IsEmpty(Prefix), Prefix & " ") &

Case(not IsEmpty(FirstName), FirstName & " ") &

Case(not IsEmpty(MiddleInitial), MiddleInitial & " ") &

Case(not IsEmpty(LastName), LastName

)

HTH

Lee laugh.gif

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