Pull a state code out of a territory with RIGHT
Take the trailing two-letter state abbreviation off the end of a territory code.
RIGHT
Returns a set number of characters from the end of a text value. Below are 1 interactive exercise that put it to work on realistic business data — you write the formula, and get told exactly what went wrong when it does not work.
RIGHT(text, [num_chars])
Need a refresher? Learn RIGHT — syntax, a worked example and where it goes wrong.
Ordered from most approachable to hardest.
Returns a set number of characters from the end of a text value. It belongs to the text functions family, and it shows up constantly in real work — which is why it is worth being genuinely fluent rather than merely familiar.
Reading about a function is not the same as being able to write it. The exercises on this page exist because the gap between recognising RIGHT and producing it from memory, correctly, on data you have not seen before, only closes by doing it.