LTRIM Function (VBA)In Microsoft Excel, the LTRIM function removes leading spaces from a string.
SyntaxLTRIM( text )
text is the string that you wish to remove leading spaces from.
VBA Function ExampleThe LTRIM function can only be used in VBA code in Microsoft Excel. Here are some examples of what the LTRIM function would return:
LTRIM(" Google com") would return "Google com"
LTRIM(" Alphabet") would return "Alphabet"
LTRIM(" Alphabet ") would return "Alphabet "
Dim sResult As String sResult = LTrim(" Alphabet ")
The variable sResult would now contain the value of "Alphabet ".