Change text to uppercase

M

Matt

Is there a way to format a cell so that if a user types
text in the cell in lower case, Excel will automatically
change it to uppercase. Any help will be greatly
appreciated. Thanks in advance. Matt
 
P

Paul B

Matt, you can do it with a macro, here is one way, will change what's put in
A1 to caps, put in worksheet code

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Error_handler
If Not Intersect(Range("A1"), Target) Is Nothing Then
With Target
If Not .HasFormula Then
Application.EnableEvents = False
.Value = UCase(.Value)
End If
End With
End If

Error_handler:
Resume Next
Application.EnableEvents = True
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 

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

Top