Thread: Proper case
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Proper case

Arne,

Try something like the following:

Sub AAA()
Dim Rng As Range
For Each Rng In Selection.Cells
If StrComp(Rng.Text, StrConv(Rng.Text, vbProperCase), _
vbBinaryCompare) < 0 Then
Rng(1, 2).Value = "x"
Rng.Value = StrConv(Rng.Text, vbProperCase)
End If
Next Rng
End Sub

Select the cells to test an then execute the procedure.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"arne" wrote in message
...
In column D ther are names and they must be in Proper Cae. I

want to loop
through these and
1. Set and x in a new column x if the name is not proper case
2. Then set propercase for these

Ex:
start
teD
DANA

Res
Ted x
Dana x