Forcing all caps in a column

  • Thread starter Thread starter Dr. Indera
  • Start date Start date
D

Dr. Indera

hello,

i'd like to know if there is a way to force specific text cells to be all
caps, regardless of what is entered.

thank you
indera
 
Hi
that is only possible using VBA. Try the following (works for column A)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("A:A")) Is Nothing Then Exit Sub
On Error GoTo CleanUp:
With Target
if .value<>"" then
Application.EnableEvents = False
.Value = UCase(.value)
end if
End With
CleanUp:
Application.EnableEvents = True
End Sub
 
Hi
yes. change the line
..Value = UCase(.value)
to
..Value = application.worksheetfunction.proper(.value)
 

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

Back
Top