RIGHT

Returns the specified number of characters from the end of a text string.

Use

RIGHT(text, num_chars) and replace text with the field or expression you want returned; replace num_chars with the number of characters from the right you want returned.

Tips

  • Reference auto-number fields as text fields in formulas.
  • If the num_chars value is less than zero, Salesforce replaces the value with zero.
Formula Example
Formula Example TRIM(LEFT(LastName, 5))&"-"&TRIM(RIGHT(SSN__c, 4)) displays the first five characters of a name and the last four characters of a social security number separated by a dash. Note that this formula assumes you have a text custom field called SSN