Thread
:
Remove unicode characters from cell containing values
View Single Post
#
5
Posted to microsoft.public.excel.programming
ANG
external usenet poster
Posts: 12
Remove unicode characters from cell containing values
On Saturday, March 12, 2016 at 3:16:03 PM UTC+4, Claus Busch wrote:
Hi,
Am Fri, 11 Mar 2016 20:29:06 -0800 (PST) schrieb
:
Pls assist with macro how to remove invisible unicode characters in a cell
try:
Sub ReplaceNPC()
Dim varNPC As Variant
Dim i As Long
With WorksheetFunction
For i = 0 To 31
Range("A1") = Replace(Range("A1"), Chr(i), " ")
Next
varNPC = Array(127, 129, 141, 143, 144, 157)
For i = LBound(varNPC) To UBound(varNPC)
Range("A1") = .Trim(Replace(Range("A1"), Chr(varNPC(i)), " "))
Next
End With
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
55101210
55101210
Sorry to disturb but its not working on the above two numbers
If you =LEN() YOU GET 9 or 10 which is not correct as you have only 8 visible characters thxs
Reply With Quote
ANG
View Public Profile
Find all posts by ANG