Proper Case with extra rules in Excel

前端 未结 4 1049
闹比i
闹比i 2021-01-25 00:19

I have used vba for Proper Case in Excel but I need to add an exception rule for it to save much manual editing. I need the first letter after \"-\" to also be Capitalized, exam

4条回答
  •  没有蜡笔的小新
    2021-01-25 01:00

    Instead of

    rng.Value = StrConv(rng.Value, vbProperCase)
    

    use

    rng.Value = WorksheetFunction.Proper(rng.Value)
    

    Though this does not consider cases like don't doesn't as mentioned by Thomas Inzina.

提交回复
热议问题