Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts

    Convert Text to Proper (2003)

    I know I can use PROPER() step by step; but, is there a macro someone might write for me that would go through an entire column of text and convert it to PROPER case?
    Thanks.

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Convert Text to Proper (2003)

    Something like:
    <pre>Sub ProperCase()
    Dim rngCell As Range
    Application.ScreenUpdating = False
    For Each rngCell In Selection
    With rngCell
    If Not .HasFormula Then
    .Formula = StrConv(.Formula, vbProperCase)
    End If
    End With
    Next rngCell
    Application.ScreenUpdating = True
    End Sub
    </pre>


    HTH
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts

    Re: Convert Text to Proper (2003)

    WOW...thanks!
    One more question...how would I pre-set the range to be, say, column C?
    Thanks again from amazingly fast reply.

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Convert Text to Proper (2003)

    You could adjust it to:

    <pre>Sub ProperCase()
    Dim rngCell As Range
    Application.ScreenUpdating = False
    For Each rngCell In Intersect(Columns("C"), ActiveSheet.UsedRange)
    With rngCell
    If Not .HasFormula Then
    .Formula = StrConv(.Formula, vbProperCase)
    End If
    End With
    Next rngCell
    Application.ScreenUpdating = True
    End Sub
    </pre>

    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •