| Be the first user to complete this post  | Add to List | 
VBA-Excel: String Functions – RTrim()
Description:
The RTrim function removes spaces on the right side of a string.
Format:
Rtrim (strMainString)
Arguments:
- strMainString
- Mandatory
- Type: String
- String whose right space needs to be trimmed.
 
Function FnRTrim()
    Dim strMainString
    strMainString = "   Sumit Jain  "
     MsgBox "Before : '" & strMainString & "' and after right Space is trimmed. After :'" &                                             RTrim(strMainString) & "'"
End Function 

Also Read About Other String() Functions
INSTR() | InstrREV() | LCase()
Also Read:
- VBA Excel - Cells, Ranges and Offset: Refer to Cells by Using Shortcut Notation
- VBA-Excel : Strings Functions – Left
- VBA-Excel: Date-Time Functions – Month(), Year() and MonthName()
- VBA-Excel : Strings Functions – Lcase
- VBA-Excel: Date-Time Functions – DateAdd()
 
    