Upper / lower case

ctomblin

New Member
Joined
Apr 25, 2002
Messages
49
I know that =UPPER(range) will convert all text in the range to upper case, but I can only make it work when the formula is in another cell. Is it possible to convert lower case to upper, and leave it in its original cells. Thanks
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
One way to do this is via a very short piece of VBA code. Copy & paste the following into a code module, then assign it to a new custom toolbar button.

Private Sub UpperCase()
Dim cell
If TypeName(Selection) <> "Range" Then Exit Sub
For Each cell In Selection
If cell.HasFormula = False Then cell.Value = UCase(cell.Value)
Next cell
End Sub

Then, when you want to convert a range to upper case, simply select the range and click the cutom toolbar button. You can of course replace the 'UCase' function with 'LCase' to convert to lower case or 'Worksheetfuntion.Proper' to convert to proper case.
 
Upvote 0

Forum statistics

Threads
1,214,392
Messages
6,119,257
Members
448,880
Latest member
aveternik

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