1. LEFT VBA function – Description
The LEFT function in VBA cuts a specified number of characters from the text starting from the left side. It can be compared to the LEFT function in an Excel worksheet. The function cuts text from other text starting from the left side. For example, from the sentence “I am a programmer” we can cut out the word “I am”.
2. LEFT Function – Syntax
The Left function syntax is as follows:
String – A text string from which to cut the text starting from the left side
Length – In the argument, we can specify how many characters from the string we want to cut from the String argument.
Function return : String / text value
3. VBA LEFT function Example
How to use LEFT function in VBA Excel? Below is an example of using the LEFT function in the VisualBasic Editor.
'officeinside.org Sub LeftFunctionExample () MsgBox Left ("VBA Function Learning", 10) Range ("A1") = Left ("VBA learning function", 10) MsgBox Left (Range ("A1"), 3) End Sub