Uppercase text

Brutium

Board Regular
Joined
Mar 27, 2009
Messages
188
:)Hello ALL!!!

Is it possible to have only a number of cells (say C5:N33 and P5:P33) to have the text show in "UPPERCASE", even though the user inputs it in "lowercase"?
How would I accomplish this?
Thank you!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I don't know of a simple format setting approach, but there are formulas you could use.

For example: =UPPER(P2) will output P2 content in Upper Case.
 
Upvote 0
It requires VBA code..

Right click the Sheet's Tab, View Code
Paste the following

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyRange As Range, c As Range
Set MyRange = Intersect(Target, Range("C5:C33, P5:P33"))
If Not MyRange Is Nothing Then
    Application.EnableEvents = False
    For Each c In MyRange
        c.Value = UCase(c.Value)
    Next c
    Application.EnableEvents = True
End If
End Sub
 
Upvote 0
Thanky ou Asala 42 and Trevor G, I am not sure how I could get the results I am looking for. Do I place the formula in each cells?

Jonmo1, I tried your code, but it does not work. I placed your code as you suggested, but I still get lower case. Also I noticed that you identified the range as C3:C33, no, the range is C3:N33, and of course, all the cells inbetween.

Thank you all for your support.
 
Upvote 0
OK, my bad..

Change that line to

Set MyRange = Intersect(Target, Range("C5:N33, P5:P33"))
 
Upvote 0
The UPPER formula is intended for an adhoc kind of thing.

In a range off to the right of your data range, you can write a formula similar to =UPPER(P2), copy it down, then copy/paste special/Values over the original column (basically overwriting the original entries with an uppercase version).

Given the number of columns, it probably won't take that long - but it is a manual process. Code can be used to automate the process, as Jonmo is doing.
 
Upvote 0
Thank you Jonmo1,
It works just as you said. It will be very useful in what I am trying to accomplish.
I am not sure if I should be asking this question in this thread or start a new one.

How can I limit the lettes that can go in the cells I mentioned earlier...
that is to say, I want only A+, A, A-, B+, B, B-, C+, C, C-, D+ D, D- and R. No other letter will be allowed in the table.
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,964
Members
452,371
Latest member
Frana

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