simple question

excel smurf

New Member
Joined
Aug 21, 2002
Messages
18
is there a way to capitalize text without retyping the text and without using the upper function? like perhaps a macro?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Jim North

MrExcel MVP
Joined
Jun 20, 2002
Messages
791
like:

<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>
 

ChrisUK

Well-known Member
Joined
Sep 3, 2002
Messages
675

ADVERTISEMENT

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

Cells(2, 1).Value = z
 

kskinne

Well-known Member
Joined
Feb 17, 2002
Messages
1,267
Office Version
  1. 365
Platform
  1. Windows
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

http://www.asap-utilities.com

HTH
kevin
 

Forum statistics

Threads
1,143,640
Messages
5,719,984
Members
422,256
Latest member
downeybm

We've detected that you are using an adblocker.

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.
Go back
Top