Alter text

E

Excel_help

How would I alter text in every cell in a single column so that the wor
is all lowercase except for the first letter which will be capitalized.

Would I require an add-in for this?

Thanks,
Andre
 
G

Gord Dibben

By Formula assuming the data is in column A.......................

In an adjacent column enter =PROPER(A1)

Double-click on fill handle to copy down.

Copy/paste special>Values then delete original column A

With a macro.......................

Sub optProper_Click()
'David McRitchie, programming, 2003-03-07
Dim rng1 As Range, rng2 As Range, bigrange As Range
Dim cell As Range
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
On Error Resume Next
Set rng1 = Intersect(Selection, _
Selection.SpecialCells(xlCellTypeConstants))
Set rng2 = Intersect(Selection, _
Selection.SpecialCells(xlCellTypeFormulas))
On Error GoTo 0
If rng1 Is Nothing Then
Set bigrange = rng2
ElseIf rng2 Is Nothing Then
Set bigrange = rng1
Else
Set bigrange = Union(rng1, rng2)
End If
If bigrange Is Nothing Then
MsgBox "All cells in range are EMPTY"
GoTo done
End If
For Each cell In bigrange
cell.Formula = Application.Proper(cell.Formula)
Next cell
done:
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP
 
T

Tom Ogilvy

If you have more than one word, the formula would be

=Ucase(Left(A1,1)) & lcase(Right(A1,len(A1)-1))


Do you want this to happen when a user enters data in that column?
 
E

Excel_help

Tom said:
If you have more than one word, the formula would be

=Ucase(Left(A1,1)) & lcase(Right(A1,len(A1)-1))


Do you want this to happen when a user enters data in that column?

NO. The text is already there.

Thanks. You've been a great help. Much appreciated!
 

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