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

Formula to count and display to the Right

Status
Not open for further replies.

ronnutter

Technical User
Aug 30, 2001
15
US
Hi,
Please help. I have a field {name}. In the {name} field is a city name and state in the following format:

las vegas, nv

I need a formula that will only display the city name, something like the Right function but to count the other way, four spaces to the right. Result should be:

las vegas

Thanks,
 
One of these should work. The first comes 4 characters from the end, the second goes up to just before the comma.

{name} [ 1 to Length ({name}) - 4 )

or

{name} [ 1 to Instr({name},',') -1 ] Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top