View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Help with cell formatting

Why bother testing, just upshift it

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
application.enableevents = false
'Target is an arguments which refers to the range being changed
If Target.Column = 2 Then
Target = UCase(Target.Text)
End If
application.enableevents = true
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Fonz" wrote in message
...
I love the sarcasm but it didn't get me where I needed to be. The whole

point
is to have it done automatically in an environment where multitasking can
lead to hair loss. I found this code and used it. It works.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'Target is an arguments which refers to the range being changed
If Target.Column = 2 Then
'this check is to prevent the procedure from repeatedly calling itself
If Not (Target.Text = UCase(Target.Text)) Then
Target = UCase(Target.Text)
End If
End If
End Sub

"Paul Mathews" wrote:

Bravo, sometimes the simplest solutions are the best! :)

"Gary''s Student" wrote:

First, select the column and select the cell format to be text
Second, touch the CAPS LOCK key
third, type
--
Gary's Student


"Fonz" wrote:

I would like to format a column of cells to allow for me to enter

text and
for the cells to automatically make the txt ini all capital letters.

HOw can
this be done please? Thanks in advance.