Hi Sathish,
Try:
Sub CleanRange()
Dim SBar As Boolean, Cell As Range, CellCount As Long, I As Long
With Application
SBar = .DisplayStatusBar
.DisplayStatusBar = True
.ScreenUpdating = False
.Calculation = xlManual
On Error Resume Next
I = 0
If Selection.Rows.Count * Selection.Columns.Count > 1 Then
CellCount = Selection.Rows.Count * Selection.Columns.Count
Else
CellCount = ActiveSheet.UsedRange.Rows.Count * ActiveSheet.UsedRange.Columns.Count
End If
For Each Cell In Selection.SpecialCells(xlConstants)
Cell.Value = .Trim(Replace(Replace(Cell.Value, Chr(160), ""), " ", ""))
I = I + 1
.StatusBar = Int(I / CellCount * 100 + 0.5) & "% Cleaned"
Next Cell
.Calculation = xlAutomatic
.StatusBar = False
.DisplayStatusBar = SBar
.ScreenUpdating = True
End With
MsgBox "Finished cleaning " & CellCount & " cells.", 64
End Sub
If you select a range, the macro acts only on that range; other wise it acts on the whole workbook. A progress report is given on the status bar, plus a message box at the end.