RIGHT(string, length)

Returns a number of characters from the right of a string (String).


stringThe text string (String).
lengthThe number of characters to return (Long).

REMARKS
* If "string" is Null, then Null is returned.
* If "length" = 0, then a zero length string ("") is returned.
* If "length" > Len("string"), then "string" is returned.
* To determine the number of characters in string, use the LEN function.
* You can use the LEFT function to return a number of characters from the left of a string.
* You can use the LEN function to return the number of characters in a string.
* You can use the INSTR function to return the position of a substring within a larger string.
* You can use the RIGHTB function that can be used with byte data.
* You can use the RIGHT$ function to return a String data type instead of Variant/String data type.
* You can use the RIGHTB$ function to return a String data type instead of a Variant/String data type.
* The equivalent Excel function is Application.WorksheetFunction.RIGHT
* The equivalent .NET function is Microsoft.VisualBasic.Strings.Right
* For the Microsoft documentation refer to docs.microsoft.com

Right("sometext", 4) = "text" 
Right("sometext", 20) = "sometext"
Right("", 6) = ""

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top