Consulting

Results 1 to 3 of 3

Thread: remove . from the last of email

  1. #1

    remove . from the last of email

    Hi
    Team hope you are doing great
    i need a dynamimc range excel Vba code for Column k that remove just . from the last of email
    Attached Images Attached Images

  2. #2
    VBAX Expert
    Joined
    Aug 2004
    Posts
    810
    Location
    give this a try
    Sub RemoveDot()
        Dim lRow As Long
        Dim LastRow As Long
        
        Dim WS As Worksheet
        
        Set WS = ActiveSheet
        LastRow = FindLastRow(WS, "K")
        For lRow = 2 To LastRow
            With WS
                If Right(.Cells(lRow, "K"), 1) = "." Then
                    .Cells(lRow, "K") = Left(.Cells(lRow, "K"), Len(.Cells(lRow, "K")) - 1)
                End If
            End With
        Next lRow
    End Sub
    Function FindLastRow(ByVal WS As Worksheet, ColumnLetter As String) As Long
        FindLastRow = WS.Range(ColumnLetter & Rows.Count).End(xlUp).Row
    End Function

  3. #3
    Excellent ,where is a button of mark as solution

Posting Permissions

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