HomeMicrosoft OfficeExcelConvert String to Proper Case in Excel VBA

Convert String to Proper Case in Excel VBA

In this post, you will learn how to convert String to proper case with-in your Excel spreadsheet using Excel VBA

Convert String to Proper Case in Excel VBA

To convert a string of text into proper case, you can use the StrConv function .

 The StrConv function has two arguments. The first part of argument is the original string and the second part is the conversion case (Lower case, Upper case, Proper case).

Example program for converting a string to proper case in Excel VBA.

Code:

Sub Convert_To_ProperCase():
Dim Text As String
Dim ProperCase As String
Text = "cOnVeRting string to PrOpEr Case fUnctIon"
ProperCase = StrConv(Text, vbProperCase)
MsgBox ProperCase
End Sub
Convert String to Proper Case in Excel VBA - Developer Publish

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this article, you will learn about the SKEW.P function, the formula syntax and usage of the function in Microsoft...
In this article, you will learn about the SKEW function, the formula syntax and usage of the function in Microsoft...
In this article, you will learn about the RANK.EQ function, the formula syntax and usage of the function in Microsoft...
  • Excel
  • November 23, 2021