Help?! Format Cells for ALL CAPS

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am setting up a template and need to format some cells/columns to come in
all caps for State abreavations. I expected to find the all caps option in
the format text menu but did not. The only info I've found gives me a
formula to pull in text from another cell and make it caps (=Upper). Can
someone help me with this?
 
Say your state abbreviations are in column C (that is, column 3). Copy the
following code. Right-click on the sheet tab, select View Code, and paste
the code in there. James

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 Then
Application.EnableEvents = False
If Target.Cells.Count = 1 Then Target = UCase(Target)
End If
Application.EnableEvents = True
End Sub
 
Back
Top