Column format

R

rob

Hi there ...

I am wondering if Excel 2000 has a similar feature as Word
2000 that allows text case to be formatted in a number of
ways (UPPER, lower, Title Case)

In particular, I want to be able to force the contents of
an entire column to be UPPERCASE, either after the entries
have been made or as they are being made. Is this a
possibility?

TIA

rob
 
M

Mark Wielgus

All three formats are supported in excel. To do this
from VBA, here's a Proper or Title case example:

1. Press alt and F11 to open the code window
2. Double click the sheet name you want to automatically
change case
3. put this code in the code window

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Application.EnableEvents = False
If Target.Column = 5 Then
Target = StrConv(Target, vbProperCase)
End If
Application.EnableEvents = True
End Sub

For uppercase you can change
StrConv(Target, vbProperCase)
to
Ucase(Target)

For lowercase you can change
StrConv(Target, vbProperCase)
to
Lcase(Target)

The 5 is the column you want this validation.

From a spreadhsheet you might be able to work something
out of this.. type any of these in cell B2 and then type
in B1

=UPPER(A1)
=LOWER(A1)
=PROPER(A1)

Mark Wielgus
www.AutomateExcel.com
 
C

CLR

Assuming your lower case (or mixed) data is in column A, put this in cell
B1 and copy down.

=UPPER(A1)

Then you can Copy > Paste special > Values for the entire column B to
eliminate the formulas, then delete old column A if you wish.

Vaya con Dios,
Chuck, CABGx3
 

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