
Originally Posted by
loslor
Thx a lot bryan.
Relating to another post, if you do a =Code(A1) on your data fields, does the code 160 appear?
Found!
the following removes the 160 (no break space) character.
Sub TrimIt()
On Error Resume Next
Application.Calculation = xlCalculationManual
Set Fn = Application.WorksheetFunction
For Each cell In Selection.SpecialCells(xlConstants, xlTextValues)
cell.Value = Fn.Substitute(cell.Value, Chr(160), Chr(32))
cell.Value = Trim(cell.Value)
Next
Application.Calculation = xlCalculationAutomatic
End Sub
---
Bookmarks