Sub test()
Dim c As Range
Application.ScreenUpdating = False
For Each c In ActiveSheet.UsedRange
c = RemoveSpecialCharacters(c.Text)
Next
Application.ScreenUpdating = True
End Sub
Function RemoveSpecialCharacters(s As String)
With CreateObject("vbscript.regexp")
.Pattern = "[^A-Z0-9_\-]"
.IgnoreCase = True
.Global = True
RemoveSpecialCharacters = .Replace(s, "")
End With
End Function