Try change to
If this doesn't do what you expected, need to see the data in workbook with before/after format.![]()
Sub test() Dim r As Range With CreateObject("VBScript.RegExp") .Pattern = "[…\-\.]+$" For Each r In Range("af2", Range("ah" & Rows.Count).End(xlUp)) r.Value = .Replace(r.Value, ".") Next End With End Sub
Bookmarks