Excel: how to convert text to upper case upon entry?
Right-click the worksheet you want this functionality on, select View Code
from the popup menu that appears and copy/paste the following into the code
window that appears...
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Whoops
Application.EnableEvents = False
If Not Intersect(Target, Range("A:B")) Is Nothing Then
Target.Value = UCase(Target.Value)
End If
Whoops:
Application.EnableEvents = True
End Sub
Change my Columns A and B reference in my Range("A:B") example to whatever
range of cells you want this functionality for.
Rick
"Doug Waters 03/03/08" wrote in
message ...
When I enter text data into an Excel cell, how can I get it to
automatically
be converted to upper case when I hit the Enter or Tab key? Yes, I know
about
the UPPER function - the problem is I want the data to be converted to
upper
case in the SAME CELL I just entered it into as lower case text.
Thanks for any help that anyone can provide.
|