Changing text from all caps to proper

beland

New Member
Joined
Oct 27, 2002
Messages
1
I need to change the text in a worksheet from ALL CAPS to proper. Please help.

Thank you.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

dk

MrExcel MVP
Joined
Feb 15, 2002
Messages
2,942
Two methods:-

Use the =PROPER(A1) worksheet function to convert it on a cell by cell basis.

Use this macro to do it for you:-

Code:
Sub ConvertToProper()
    Dim c As Range
    For Each c In ActiveSheet.UsedRange.Cells
        c.Formula = WorksheetFunction.Proper(c.Formula)
    Next c
End Sub
 

JugglerJAF

Active Member
Joined
Feb 17, 2002
Messages
274
Use the PROPER function

In a spare cell, type in the formula:
=PROPER(A1)

(of course use whatever cell reference is appropriate) and copy the formula down.

BEWARE: If you are converting names from upper case to capitalised, the proper function does not do a good job with names like MCDOUGALL, changing it to Mcdougall instead of to McDougall. Remember, the PROPER function will only capitalise the first letter of each word!
 

Richie(UK)

MrExcel MVP
Joined
May 17, 2002
Messages
3,329
Hi,

You might also want to consider this versatile little piece of code (one of Ivan's I think):

<pre>'text converter
Sub TextCon()
Dim ocell As Range, ans As String

ans = Application.InputBox("Type in Letter" & vbCr & _
"(L)owercase, (U)ppercase, (S)entence, (T)itles ")

If ans = "" Then Exit Sub

For Each ocell In Selection.SpecialCells(xlCellTypeConstants, 2)
Select Case UCase(ans)
Case "L": ocell = LCase(ocell.Text)
Case "U": ocell = UCase(ocell.Text)
Case "S": ocell = UCase(Left(ocell.Text, 1)) & _
LCase(Right(ocell.Text, Len(ocell.Text) - 1))
Case "T": ocell = Application.WorksheetFunction.Proper(ocell.Text)
End Select
Next

End Sub</pre>
HTH
 

Forum statistics

Threads
1,144,352
Messages
5,723,880
Members
422,524
Latest member
wirkkarn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top