Home Excel Powerpoint Word Outlook Error Codes

VBA Useful Codes

Welcome to the World of VBA
Home > VBAUsefulCodes

Remove Special Characters other than numbers


Remove Special Characters other than numbers

Dim remnum1 As Range

Application.ScreenUpdating = False

With CreateObject("VBScript.RegExp")

    .Pattern = "[^0-9.-]"

    .Global = True

    For Each remnum1 In Thisworkbook.Sheets("sheetname").Range("A2", Range("A" & Rows.Count).End(xlUp))

        remnum1.Offset(, 0) = .Replace(remnum1.Value, "")

    Next remnum1

End With

Subscribe

Enter your e-mail below and get notified on the latest blog posts.




Tags

VBA Outlook KPI Excel Alt+F11 Dashboards Macros Recording Graphs Automation Developer WaterFall Powerpoint Charts Pivot Tables Forecast Charts


Follow Us