Dear All,
I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when lines are in thousands, Can somebody provide a more efficient code?
Sub ClearExtraCharacters()
Dim rng As Range, cell As Range
On Error Resume Next
Set rng = Application.InputBox("Select Range", "Range Selection", , , , , , 8)
On Error GoTo 0
If rng Is Nothing Then Exit Sub
For Each cell In rng.Cells
cell.Value = AlphaNumericOnly(cell.Value)
Next cell
MsgBox "Fixed", 48, "Fixed"
End Sub
I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when lines are in thousands, Can somebody provide a more efficient code?
Sub ClearExtraCharacters()
Dim rng As Range, cell As Range
On Error Resume Next
Set rng = Application.InputBox("Select Range", "Range Selection", , , , , , 8)
On Error GoTo 0
If rng Is Nothing Then Exit Sub
For Each cell In rng.Cells
cell.Value = AlphaNumericOnly(cell.Value)
Next cell
MsgBox "Fixed", 48, "Fixed"
End Sub