Lower Case or proper Case??
http://www.cpearson.com/excel/case.htm
or
http://www.mvps.org/dmcritchie/excel/proper.htm
Some misc examples of case macros from various people in the group:-
Sub CAPS()
'select range and run this to change to all CAPS
Dim Cel As Range
For Each Cel In Intersect(Selection, ActiveSheet.UsedRange)
Cel.Formula = UCase$(Cel.Formula)
Next
End Sub
-------------------------------------------------------
Sub MakeUpperCase()
For Each cell In ActiveSheet.UsedRange
If cell.HasFormula = False Then
cell.Value = UCase(cell.Value)
End If
Next cell
End Sub
Sub MakeLowercase()
For Each cell In ActiveSheet.UsedRange
If cell.HasFormula = False Then
cell.Value = LCase(cell.Value)
End If
Next cell
End Sub
--------------------------------------------------------
Sub MakeProperCase()
Application.ScreenUpdating = False
Dim myCell As Range
Dim myRng As Range
On Error Resume Next
Set myRng = Intersect(Selection, _
Selection.Cells _
.SpecialCells(xlCellTypeConstants, xlTextValues))
On Error GoTo 0
If myRng Is Nothing Then
MsgBox "Please select a range that contains text--no formulas!"
Exit Sub
End If
For Each myCell In myRng.Cells
myCell.Value = StrConv(myCell.Value, vbProperCase)
Next myCell
Application.ScreenUpdating = True
End Sub
--------------------------------------------------------
Sub ProperCaseMak()
Dim c As Range
Application.ScreenUpdating = False
For Each c In ActiveSheet.UsedRange
If c.HasFormula = False Then
c.Value = StrConv(c.Value, vbProperCase)
End If
Next c
Application.ScreenUpdating = True
End Sub
--------------------------------------------------------
Sub MakeUpperCase2()
Application.ScreenUpdating = False
Dim myCell As Range
Dim myRng As Range
On Error Resume Next
Set myRng = Intersect(Selection, _
Selection.Cells _
.SpecialCells(xlCellTypeConstants, xlTextValues))
On Error GoTo 0
If myRng Is Nothing Then
MsgBox "Please select a range that contains text--no formulas!"
Exit Sub
End If
For Each myCell In myRng.Cells
myCell.Value = StrConv(myCell.Value, vbUpperCase)
Next myCell
Application.ScreenUpdating = True
End Sub
--------------------------------------------------------
Sub ToggleCase2()
For Each cell In ActiveSheet.UsedRange
If cell.HasFormula = False And cell.Value = UCase(cell.Value) Then
cell.Value = LCase(cell.Value)
Else
cell.Value = UCase(cell.Value)
End If
Next cell
End Sub