RIGHT
Name
Right
Description
Returns the rightmost characters from a text value.
Syntax
RIGHT(Text, Num_chars)
Remarks
Arguments are as follows:
Argument | Description |
---|---|
Text | Text string from which you want to return characters. |
Num_chars | (Optional) Specifies the number of characters to return. |
The Text argument can be a string, a formula that returns a string, or a reference to a cell containing a string.
Note the following about the Num_chars argument:
- The Num_chars argument must be greater than or equal to zero.
- If the Num_chars argument is greater than the length of text, RIGHT returns all text.
- If the Num_chars argument is omitted, 1 is assumed.
See also CHAR, LEFT, LOWER, MID, PROPER, and UPPER.
Data Type
Accepts string data for the Text argument and numeric data for the Num_chars argument. Returns string data. For more information, see Data Type for Each Cell Type.
Example
fpSpread1.Formula = "RIGHT(""Total Sales"",5)" equals "Sales"
fpSpread1.Formula = "RIGHT(""Collie dog"")" equals "g"