How to Convert All Cell Values (Text) to UPPER Case VBA

How to Convert All Cell Values (Text) to UPPER Case VBA

When you want to convert a cell or text value in excel, you apply “Upper” formula in excel and then you apply the same formula to all the columns in the data set. Did you think to convert all cell and column values in one go? Here is the solution for “How to Convert All Cell Values (Text) to UPPER Case VBA” in excel for complete data set in excel.

In this is excel tip, you’ll learn to use VBA syntax function “UCase”

VBA Code:

Sub UPPERCase()

'Talentnett Solutions - visit us at https://talentnett.com/'

Dim Rng As Range
Set Rng = Application.InputBox("Range", "Get Range", Type:=8)
For Each Cell In Rng 
 Cell.Value = UCase(Cell) 'change this to "Application.WorksheetFunction.Proper(cell)"
 'if you want to convert data/text range to Proper Case' 
 Next Cell

End Sub

#Step 1 – Go to Excel

#Step 2 – Right-click on the sheet tab>>View code or Press ALT+F11

#Step 3  – Paste the above code in the VBA window and Press Alt+Q

paste macro code here

#Step 4 – Save your excel file as a macro-enabled file (Press “F12” >> change Save Type as “Excel Macro-Enabled Workbook”)

#Step 5 – Insert any shape – Insert>>Shapes

#Step 6 – Right-click on the shape and assign that macro[UPPERCase]

#Step 7 – Select the data range and press “ok”

Cell/Text values will be converted to UPPER Case

Convert All Cell Value (text) to UPPER Case

COMMENTS (1)

  • comment-avatar

    I don’t even know how I ended up here, but I thought this post was great.
    I do not know who you are but certainly you are going to a famous
    blogger if you aren’t already 😉 Cheers!