Formatting exsisting spreadsheet

  • Thread starter Thread starter Craig Arnott
  • Start date Start date
C

Craig Arnott

Hi All,
I have a spreadsheet full of contacts and addresses. At
the moment it is all in upper case. I want to convert the
whole sheet so that it is in the proper case of the first
letter upper and the rest lower case.

Does anyone know if this is possible

thanks in advance

Craig
 
Open the workbook, press Alt + F11, click insert>modules and paste in the
below

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 data and run the macro alt
+ F8
 
Back
Top