Dimitris254
Board Regular
- Joined
- Apr 25, 2016
- Messages
- 139
thank you for the info, unfortunately i'm not the owner of the document - but i have to fix it before using it...Something else to consider if the values are being entered manually is to try to force the correct entry in the first place with a Data Validation custom formula applied to column B
=EXACT(B1,PROPER(B1))
Might as well throw this in too
Code:Sub t() Dim c As Range With ActiveSheet For Each c In .Range("B2", .Cells(Rows.Count, 2).End(xlUp)) txt = StrConv(c.Text, vbProperCase) c.Value = txt Next End With End Sub
StrConv( ,vbProperCase) and the worksheet function PROPER() do not behave exactly the same. You have found an example of that fact.after testing this a little more, i noticed that it the Proper function will decapitalise (as it should) some names, e.g. Peter-Georg will turn into Peter-georg
which i wonder why is the reason, since Rick is also using Proper![]()
StrConv( ,vbProperCase) and the worksheet function PROPER() do not behave exactly the same. You have found an example of that fact.