Format changes

  • Thread starter Thread starter Myles Bauer
  • Start date Start date
M

Myles Bauer

I need to know if I can format a single column of cells to default upper
case on a worksheet


TIA
Myles
 
Hi
one way: use a helper column
- In B1 enter =UPPER(A1)
- copy this formula down
- now select column B and copy this colum
- goto 'Edit - Paste Special' and insert the column as 'Values'
 
Thanks
Myles

Frank Kabel said:
Hi
one way: use a helper column
- In B1 enter =UPPER(A1)
- copy this formula down
- now select column B and copy this colum
- goto 'Edit - Paste Special' and insert the column as 'Values'
 
You can't choose a default uppercase format, but you can run an event
macro that changes text to uppercase:

Put this in the Worksheet code module (right-click on the worksheet tab
and choose view code):


Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count = 1 Then
If .Column = 1 Then
If Not (IsEmpty(.Value) Or _
IsNumeric(.Value) Or .HasFormula) Then
Application.EnableEvents = False
.Value = UCase(.Value)
Application.EnableEvents = True
End If
End If
End If
End With
End Sub
 
Back
Top