Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to split a FullName field into FirstName and LastName fields

Formula Help

How to split a FullName field into FirstName and LastName fields

by  Storyteller  Posted    (Edited  )
Hello All,
The following formula uses Crystal Syntax.

Situation {Customers.ContactName} = Fred Flintstone

Use this formula
@First Name
Left({Customers.ContactName},Instr({Customers.ContactName},chr(32))-1)
The result will be: Fred


Use this formula
@Last Name
Right({Customers.ContactName},(Length({Customers.ContactName})-(Instr({Customers.ContactName},chr(32)))))

Another version of the @Last Name
Mid({Customer.ContactName},Instr({Customer.Contact Came},Chr(32))+1)

The result will be: Flintstone
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top