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

Best Way to Show the last 2 characters of a field

Status
Not open for further replies.

socalshpr

IS-IT--Management
Apr 7, 2011
1
US
Hello and Welcome to the world of ERP where there is no state code. The State is always embedded in a address line with the City.

The pattern is City, State eg Anaheim, CA

How do I only get the State to show up

Thanks!
 
Create a formula like:

Code:
@State
Right({Addressline,2})



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
for clear understanding, i am assigning your address line to a variable x

x = "Anaheim, CA"
x = Mid(x, InStr(x, ",") + 1, Len(x))

output of x = " CA"

regards,
thiru(dot)in(at)gmail(dot)com
 
+1 turkbear.

if there is the possibility of trailing spaces after the state initials, add TRIM, like this:
Right(TRIM({Table.Addressline}),2)
 
Hi,
Nice addition fisheromacse ,
I was wondering if I should have done that...



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top