Force upper-case characters?

J

Jay

Is it possible to make any cell display only upper-case letters. So, even if
a lower-case letter is entered its upper case equivalent is displayed.

I know I could simply use UPPER function to display the contents of another
cell in upper-case, but I'm wanting to avoid the need to use other cells.

Any help appreciated.

Regards

Jason
 
M

Max

Try this sub taken from a post by Tom Ogilvy
which will force uppercase in col A:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error goto ErrHandler
If Target.Column = 1 Then
Application.EnableEvents = false
Target.Value = UCase(Target.Value)
End if
ErrHandler:
Application.EnableEvents = True
End Sub

To implement:
Right click on the tab of the sheet where you want this behavior and select
view code, then paste in the above procedure
 
J

Jay

Max said:
Try this sub taken from a post by Tom Ogilvy
which will force uppercase in col A:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error goto ErrHandler
If Target.Column = 1 Then
Application.EnableEvents = false
Target.Value = UCase(Target.Value)
End if
ErrHandler:
Application.EnableEvents = True
End Sub

To implement:
Right click on the tab of the sheet where you want this behavior and select
view code, then paste in the above procedure

thanks Max, I'll give it a go.

Regards

Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Upper Case and Max 3 letters 3
Lower-Case Characters 2
Upper Case 2
upper case 1
Setting Conditions in a Cell 4
Combo Box case sensitivity 0
upper case 3
Restricting Cell entry to certain letters 7

Top