Correcting Upper Case Text


Posted by J.R. Shumaker on August 02, 2001 10:00 AM

I have an entire spreadsheet of text that is all in upper case letters. How can I automate correcting to lower case as appropriate ?

Posted by troy on August 02, 2001 10:33 AM

Can you use the =proper() function?

Posted by J.R on August 02, 2001 10:41 AM


Posted by J.R. Shumaker on August 02, 2001 10:42 AM

Posted by J.r. on August 02, 2001 10:43 AM

I do not know how to use that function. Please describe. Thanks

Posted by troy on August 02, 2001 12:06 PM

If the text is in A1 you would type =proper(A1) into B1. This would make the first letter cap. and the rest lower case for each word in the cell. If there is more data in column A copy the fomula down.



Posted by Ivan F Moala on August 03, 2001 6:15 AM

You can run this small code.
Enter it by
1) Press Alt + F11 (gets you into VBA editor)
2) Press Ctrl + R (gets you to the project explorer)
3) right click on any of the objcts and select
insert > Module
4) Paste this code in.
5) Run it on the sheet you want to change
Tools | macros | macros
then select the macro to run.

Sub ChangeText_Proper()
Dim cCell As Range
Dim TheRg As Range

On Error Resume Next
Set TheRg = Selection.SpecialCells(xlCellTypeConstants, 2)
If TheRg Is Nothing Then MsgBox "No Text!": Exit Sub
On Error GoTo 0

For Each cCell In TheRg
cCell = Application.WorksheetFunction.Proper(cCell)
Next
MsgBox "Done!"
End Sub


Post if unsure

Ivan