Formatting Text in Excel

F

frankfenimore

I'm trying to change all-caps text to Proper. I found the formula to
do this, but I run into trouble by trying to apply it. I create a
circular reference, apparently. How do I fix this? Better yet, is
there a way to change the whole spreadsheet at once? There are a lot
of cells I need to apply this too. Thanks!
 
B

Bob Phillips

Sub SetToProper()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If Not cell.HasFormula Then
cell.Value = Application.Proper(cell.Value)
End If
Next cell
End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
F

frankfenimore

I appreciate the help, but you'll have to forgive me - I'm still
totally lost. I have a very rudimentary knowledge of the program.
 
B

Bob Phillips

Just go into the VBIDE, Alt-F11. Insert a new code module (Insert>Module).
Paste that code in the code pane, and then put the cursor in the code, and
run it , F5.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Top