View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein \(MVP - VB\)[_1035_] Rick Rothstein \(MVP - VB\)[_1035_] is offline
external usenet poster
 
Posts: 1
Default Excel: how to convert text to upper case upon entry?

I see I left out one word from my description that might have led you
astray. The first sentence I posted should have said...

Right-click the worksheet TAB you want this functionality on....

Rick


"116" wrote in message
...
I have tried a number of different scripts about converting to UPPER Case,
but with no luck. I am running Excel 2003. Not sure what the problem
might
be. Besides me.

David

"Rick Rothstein (MVP - VB)" wrote:

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.