Upper and lower cases

  • Thread starter Thread starter Guest
  • Start date Start date
You can run a macro, open the wb, press alt + F11,
click insert>module and paste in the following

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



beware of line wrapping
press alt + Q to close the VBE, select the taxt and press alt + F8 and
double click the macro name

Regards,

Peo Sjoblom
 

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