Help with cell formatting

G

Guest

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.
 
G

Guest

First, select the column and select the cell format to be text
Second, touch the CAPS LOCK key
third, type
 
G

Guest

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
 
B

Bob Phillips

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)
 
G

Guest

Perhaps you should have made it clear in your first post what 'the whole
point of it was'. I certainly did not find the replay sarcastic. If you are
going to ask a simple question you will get a simple response, if you want
something more in depth make that clear in your intial question.
 

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