LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"