Change lowercase to uppercase
To change lowercase into uppercase for a specific text sting we need to apply the Excel UPPER function
Example: Change lowercase to uppercase
=UPPER(B5)
|
The formula uses the Excel UPPER function to return the specified text in cell B5, which is all in lowercase, in uppercase.
|
Sub Change_lowercase_to_uppercase()
'declare a variable
Dim ws As Worksheet
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'apply the formula to change lowercase to uppercase
ws.Range("C5") = UCase(ws.Range("B5"))
ws.Range("C5") = UCase(ws.Range("B5"))
End Sub
OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
PREREQUISITES
Worksheet Name: Have a worksheet named Analysis.
Text: Have the text which you want to convert to uppercase in cell ("B5").
Worksheet Name: Have a worksheet named Analysis.
Text: Have the text which you want to convert to uppercase in cell ("B5").
ADJUSTABLE PARAMETERS
Output Range: Select the output range by changing the cell reference ("C5") in the VBA code to any cell in the worksheet, that doesn't conflict with formula.
Text: Select the text which you want to convert to uppercase by changing the cell reference ("B5") to any range in the worksheet, that doesn't conflict with the formula.