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!

Removing unwanted characters from Str? Help! 1

Status
Not open for further replies.

Drakhan

Technical User
Jun 3, 2002
67
0
0
US
Hello all!

I am a beginning Crystal user and am having trouble creating a formula to do the following:

* I have a string field ({Rep}), that contains a user ID number and their name. The ID number is always constant, but may contain a different beginning variable. This will be either a "#" or a "E". For example #123456 or E123456.

* The {Rep} field itself looks like this in the database, for example:

#123456 J. Smith
E123456 B. Jones
#222222 James Bond
E654321 George Washington

So, the field is "User ID, 5 spaces, Name".

* What I am attempting to accomplish in the report is to somehow remove the # or E User ID and the 5 spaces completely, leaving only the name. For example:

J. Smith
B. Jones
James Bond
George Washington

Any help would be most appreciated and I thank you in advance!
 
If the length of User Id is fixed, i.e. 7 characters :

mid(text,13)

Or if it's variable :

mid(text,instr(text," ")+5)

Reebo
UK

"Before you judge a man, walk a mile in his shoes. After that, who cares? ...He's a mile away and you've got his shoes." - Billy Connolly
 
That did it. You're awesome. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top