<pre>
Sub Uppercase()
' Loop to cycle through each cell in the specified range.
For Each x In Range("A1:A5")
' Change the text in the range to uppercase letters.
x.Value = UCase(x.value)
Next
End Sub
</pre>
Can't see why you'd want to do this but here you go ..
x = Cells(1, 1).Value
z = ""
For y = 1 To Len(x)
If (Asc(Mid(x, y, 1)) > 96 And Asc(Mid(x, y, 1)) < 124) Then
z = z & Chr(Asc(Mid(x, y, 1)) - 32)
Else
z = z & Mid(x, y, 1)
End If
Next
ASAP utilities is another add-in that you can download - it contains an option for converting a range of cells to upper case, lower case, proper, etc. - in addition it has many other utilities that I have found to be very useful. You can download it for free at
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.