Thread: vbproper
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Joanne[_4_] Joanne[_4_] is offline
external usenet poster
 
Posts: 29
Default vbproper

I need to change a list into vbproper case.
Here is the code I am using, which works just fine.
Public Sub ProperCase()
Dim Rng As Range
For Each Rng In Selection.Cells
If Rng.HasFormula = False Then
Rng.Value = StrConv(Rng.Value, vbProperCase)
End If
Next Rng
End Sub
My problems is it lower cases the second letter in the State, such as
MN to Mn - I would like to keep it in upper case if possible.
Also in an address such as 23W482 it lowers the 'w'. I think I should
be able to keep that upper if I knew how to tell the macro to skip
alphas that are in the middle of numerics.
Can anyone help me out with these two little problems?
TIA
Joanne