Be the first user to complete this post
|
Add to List |
VBA-Excel : Strings Functions – Left
Description:
Returns a string containing number of characters specified by the user, starting from left side of the input string.
Format:
Left(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 FnLeft() Dim mainString mainString = "SumitJain" intLength = 4 MsgBox "The first" & intLength & " characters from left are ' " & Left(mainString, intLength) & " '" End Function
Also Read About Other String() Functions
INSTR() | InstrREV() | LCase()
Happy Macroing
Sumit Jain
Also Read:
- VBA-Excel : Strings Functions – Instr
- VBA-Excel: Date-Time Functions – Month(), Year() and MonthName()
- VBA Excel - Cells, Ranges and Offset : Offset
- VBA-Excel: Array Functions – LBound and UBound()
- VBA Excel - Cells, Ranges and Offset : Cells