Formatting exsisting spreadsheet

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
 
P

Peo Sjoblom

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
 

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

Top