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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split a field

Status
Not open for further replies.

LindaLoo929

Technical User
Jan 19, 2010
2
US
I have data that I need to split. The field is formatted LastName/FirstName Middle Name and I need to break up into 3 different fields. I tried the Split formula, but keep getting errors.

Any thoughts?
 
Maybe not the most elegant, but how about something like this:
Create 4 new formulas:

#1 = {@LastName}
Split({YourTable.YourField},"/")[1];


#2 = {@LenLastName}
len({@LastName}


#3 = {@FirstName}
MID(Split({YourTable.YourField}," ")[1],lenlast+2);

#4 = {@MiddleName}
Split({YourTable.YourField}," ")Ubound(Split({YourTable.YourField}," ")];





 
All is working perfectly, except for #4. I am getting and error that a ) is missing. I've added and moved around, but still not working.

 
Missing a bracket--should be:

Split({YourTable.YourField}," ")[Ubound(Split({YourTable.YourField}," ")];

You would have to adjust your formulas though if any elements are missing.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top