Be the first user to complete this post
|
Add to List |
VBA-Excel : Strings Functions – Right
Description:
Returns a string containing number of characters specified by the user, starting from right side of the input string.
Format:
Right(strMainString,intLength)
Arguments:
- strMainString
- Mandatory
- Type: String
- String whose characters to be returned.
- intLength
- Mandatory
- Type: Numeric
- Number of characters to be returned.
- If number specified is greater than the string length then entire string is returned.
Function FnRight() Dim mainString mainString = "SumitJain" intLngth = 5 MsgBox "The first " & intLength & " characters from Right are ' " & Right(mainString, intLngth) & " '" End Function
Also Read About Other String() Functions
INSTR() | InstrREV() | LCase()
Also Read:
- VBA-Excel: Date-Time Functions – Hour(), Minute(), Second()
- VBA-Excel: Date-Time Functions – DateValue()
- VBA-Excel: String Functions – RTrim()
- VBA Excel - Cells, Ranges and Offset: Refer to Cells by Using Shortcut Notation
- VBA-Excel: String Functions – strComp()