Results 1 to 4 of 4

Thread: Solved: how to convert first later to upper case and after onward lower case?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Solved: how to convert first later to upper case and after onward lower case?

    i try this code in my sh
    but it go in loop and do nothing
    can some one help me

    [vba]Option Explicit

    Sub ChangeCase_5()
    Dim r As Range, RNG As Range, s As Double, c As Double, d As Double
    Dim LR As Long
    Application.ScreenUpdating = False

    With Worksheets("Report")

    LR = .Range("C" & .Rows.Count).End(xlUp).Row
    Set r = .Range("C5:C" & LR)

    Do
    Set RNG = Nothing

    On Error Resume Next

    Set RNG = .Range("c6:C" & LR).SpecialCells(xlCellTypeVisible) 'if no items found
    RNG.Value = StrConv(RNG, vbProperCase)
    RNG.Offset(, 10).Value = "RNG"
    Loop
    End With

    ExitHandler:
    Set r = Nothing
    Application.ScreenUpdating = True
    End Sub
    [/vba]
    Last edited by Aussiebear; 11-20-2010 at 05:34 PM. Reason: Adjusted to use the correct tags around the code section

Posting Permissions

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