In Excel worksheet, the converts all the lowercase characters of a text string into uppercase. There is a similar function in that also does the same – the UCase function. The VBA UCase function takes a string as the input and converts all the lower case characters into upper case. Syntax of the VBA UCASE Function Below is the syntax of the VBA UCase function UCase(String) ‘String’ is the text in which you want to convert all the lowercase to uppercase. Download quicktime 7 player free for pc and mac os x 10.4.11. You can use a text string, a range reference that contains the text string, or a variable that has the text string.
Let’s have a look at a couple of example of using the UCase function in Excel VBA. VBA UCase Examples The below code would convert the specified text into uppercase and then display a with this text. Sub UCaseExample1() MsgBox UCase('Good Morning') End Sub Below is another example VBA code, where I have used a variable (‘Var’) to hold the text string. The UCase function is then used to convert it the lower case characters into uppercase. Sub UCaseExample2() Dim Var As String Var = 'Good Morning' MsgBox UCase(Var) End Sub Another example below shows how to take the string from a cell (A1) and show the uppercase text of it in a message box.
Learn how to use Excel's UPPER function for both Mac and PC. Includes numerous formula examples in Excel (WITH PICTURES). Text – A string of text. Additional Notes. The UPPER Function and LOWER Function are useful when working with case-sensitive Excel Functions such as Find Function. Excel Text Functions List - Links to Each of the Built-In Text Functions with Full Description, Examples and Common Errors. Note that some of the Excel text functions listed below are new to Excel 2013 or Excel 2016, so are not available in earlier versions of Excel.
Sub UCaseExample3() MsgBox UCase(Range('A1')) End Sub While all these above examples work, you’re unlikely to use this function to simply convert or show the uppercase string. Simple cad for mac. Below is a more practical example of the UCase function in Excel VBA. The below code would go through all the cells in the selected range and convert all the text strings into upper case. Sub UCaseExample4() Dim rng As Range Set rng = Selection For Each Cell In rng Cell.Value = UCase(Cell) Next Cell End Sub Here are a few important things to know about the VBA UCase function: • It affects only the lowercase characters of the text string. Any character other than the lowercase text characters is left unchanged.
This means that numbers, special characters, and punctuations remain unchanged. • If you use a null character (or a reference to an empty cell), it will return a null character.

Other Useful Excel VBA Functions: •.
