Delete parts of a string

tigertim71

Registered User.
Local time
Today, 12:10
Joined
Apr 18, 2008
Messages
12
Hi,

I am trying to delete a part of a string but not all of it.

For example; American Express Inc. I would like to delete only the "Inc.", but leave "American Express".

How is this done?

Many Thanks,

Tim
 
One way would be the Replace() function. More info in Help.
 
Trim( Left( "American Express Inc", Len( "American Express Inc" ) - Len( "Inc" ) ) ) :D
 
OK- thanks.

This worked:
Replace([Teams.Team],"Inc."," ")

This worked, but not in the 'update to' area of the query:
Trim( Left( "American Express Inc.", Len( "American Express Inc." ) - Len( "Inc." ) ) )- it says 'The expression you entered has an invalid. dot or ! or operator or invalid parentheses'.
 
Hmmm... Just typed that snippet into the Immediate Window and hit Enter
Code:
?Trim( Left( "American Express Inc.", Len( "American Express Inc." ) - Len( "Inc." ) ) )
American Express

Looks like it is working for me...
 

Users who are viewing this thread

Back
Top Bottom