change case of text

  • Thread starter Thread starter habikeys
  • Start date Start date
H

habikeys

Some recent data was imported to an Excell worksheet that
had a large amount of text in capital letters. Is there a
way to change this data to "PROPER" throughout the entire
worksheet?
Thank you
Gloria Anderson at Habitat for Humanity of Key West and
the Lower Florida Keys
 
You would need a macro for that, press Alt + F11, click insert>module and
paste the below
into the window

Sub PropCase()
Application.DisplayAlerts = False
Dim R As Range
For Each R In Selection.Cells
If R.HasFormula Then
R.Formula = "=PROPER(" & Mid(R.Formula, 2) & ")"
Else
R.Value = Application.Proper(R.Value)
End If
Next
Application.DisplayAlerts = True
End Sub

press alt + Q to close the VBA editor, select the range with the all caps
and press alt + F8 and select
PropCase and click Run
 
Thank you sooooooooooooo much
-----Original Message-----
You would need a macro for that, press Alt + F11, click insert>module and
paste the below
into the window

Sub PropCase()
Application.DisplayAlerts = False
Dim R As Range
For Each R In Selection.Cells
If R.HasFormula Then
R.Formula = "=PROPER(" & Mid(R.Formula, 2) & ")"
Else
R.Value = Application.Proper(R.Value)
End If
Next
Application.DisplayAlerts = True
End Sub

press alt + Q to close the VBA editor, select the range with the all caps
and press alt + F8 and select
PropCase and click Run

--

Regards,

Peo Sjoblom





.
 
Back
Top