Excel VBA LCase Function

VBA LCase Function: The LCase function in VBA converts the given String into lower case text.

Syntax

LCase (String)

Parameter

String (required)- This parameter represents the text string that you want to convert to lower case.

Return

This function returns a string after converting it to lower case.

Example 1

Sub LCaseFunction_Example1()
 ' Converting the string str to lower case text.
 Dim str As String, str1 As String
 str = "Welcome to VBA World!"
 str1 = LCase(str)
 ' The variable str1 will return "welcome to vba world!"
 ActiveCell.Value = str1
 End Sub 

Output

welcome to vba world!

VBA LCase Function

Example 2

Sub LCaseFunction_Example2()
 ' Converting the string str to lower case text.
 Dim str As String, str1 As String
 str = "Heelo WORLd. I am 22! "
 str1 = LCase(str)
 ' The variable str1 will return "heelo world. i am 22!"
 ActiveCell.Value = str1
 End Sub 

Output

heelo world. i am 22!

VBA LCase Function