Results 1 to 7 of 7

Thread: how to add range in this vba code

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Sep 2021
    Location
    INDIA
    Posts
    18
    Location

    how to add range in this vba code

    how to add range in this vba code

    like how to add column B range in this code by removing the selection


    Sub RemoveNon() 
    
        For Each r In Selection
            vout = ""
            v = r.Text
            n = Len(v)
            For i = 1 To n
                ch = Mid(v, i, 1)
                If ch Like "[0-9]" Then
                    vout = vout & ch
                ElseIf ch Like "|" Then
                    vout = vout & ch
                End If
            Next i
            r.Value = vout
        Next r
    End Sub
    Last edited by prasadk; 12-05-2021 at 09:58 AM.

Tags for this Thread

Posting Permissions

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