Weird Characters in Imported CSV files

cmccall95

New Member
Joined
Nov 11, 2019
Messages
13
I received a large amount of .CSV files from a client, and these files came from all over the world. Some of them are showing odd characters throughout the file when importing. I asked the origin of the particular files and was told the original languages were English and Spanish. I notice there are many that are Russian Language entries as well. I'm not sure the correct way to get the data to display correctly. To combat the Spanish to English problem, I have added the Spanish Language packs and also tried importing the CSV as "65001 : Unicode (UTF-8)". This changed the characters but did not make them correct.

Is there maybe a VBA code out there that can loop and convert these to whatever they are supposed to be? Or maybe remove them entirely? My next idea is loading the CSV files with a Python script and see if that is any different. I'm not sure if this is an issue with the import or possible the CSV file. When I open the original file in Wordpad, I see the same characters. Any advice is appreciated.

Examples:
-López
-Escuela República de Argentina
-Escuela de Música Salta
-ÆÑâ
-°4001
-ÞôõÑÂьúð ×ÞÃÂ
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

RayFrye

Board Regular
Joined
Jan 31, 2005
Messages
122
Office Version
  1. 365
  2. 2019
I had a similar problem and for me, this code helped resolve the problem.

It might be a starting point for you.

VBA Code:
Public AsciiArray(300)

Public Sub AsciiTest()

    strWorksheet = "<Active Worlsheet>"
    strColumn = "<Columne to walk>"

    Call MakeAcessArray
    Worksheets(strWorksheet).Visible = True
    Worksheets(strWorksheet).Select

    For xCounter = 1 To 1000
        If Range(strColumn & xCounter).Value = "" Then
            'Exit Sub
        End If
        RemoveNonASCII (Range(strColumn & xCounter).Value)
    Next

End Sub

Public Function RemoveNonASCII(str As String) As String
    Dim i As Integer
    For i = 1 To Len(str)
        If AscW(Mid(str, i, 1)) < 127 Then 'It's an ASCII character
            RemoveNonASCII = RemoveNonASCII & Mid(str, i, 1) 'Append it
        Else
            Debug.Print str
            For Y = 1 To i - 1
                SpaceCounter = SpaceCounter & " "
            Next
            Debug.Print SpaceCounter & "^Character #" & i & " Is illegal Ascii[" & AsciiArray(AscW(Mid(str, i, 1))) & "]"
        End If
    Next i
End Function
                 
Public Sub MakeAcessArray()

    AsciiCounter = 0
    AsciiArray(AsciiCounter) = "0,Non Printing,null": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "1,Non Printing,start of heading": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "2,Non Printing,start of text": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "3,Non Printing,end of text": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "4,Non Printing,end of transmission": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "5,Non Printing,enquiry": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "6,Non Printing,acknowledge": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "7,Non Printing,bell": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "8,Non Printing,backspace": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "9,Non Printing,horizontal tab": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "10,Non Printing,new line": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "11,Non Printing,vertical tab": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "12,Non Printing,new page": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "13,Non Printing,carriage return": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "14,Non Printing,shift out": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "15,Non Printing,shift in": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "16,Non Printing,data link escape": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "17,Non Printing,device control 1": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "18,Non Printing,device control 2": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "19,Non Printing,device control 3": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "20,Non Printing,device control 4": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "21,Non Printing,negative acknowledge": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "22,Non Printing,synchronous idle": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "23,Non Printing,end of trans. block": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "24,Non Printing,cancel": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "25,Non Printing,end of medium": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "26,Non Printing,substitute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "27,Non Printing,escape": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "28,Non Printing,file separator": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "29,Non Printing,group separator": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "30,Non Printing,record separator": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "31,Non Printing,unit separator": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "32,Non Printing,space": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "33,!,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "34,“,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "35,#,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "36,$,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "37,%,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "38,&,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "39,‘,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "40,(,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "41,),Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "42,*,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "43,+,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "44,,,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "45,–,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "46,.,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "47,/,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "48,0,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "49,1,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "50,2,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "51,3,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "52,4,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "53,5,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "54,6,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "55,7,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "56,8,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "57,9,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "58,:,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "59,;,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "60,<,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "61,=,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "62,>,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "63,?,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "64,@,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "65,A,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "66,B,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "67,C,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "68,D,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "69,E,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "70,F,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "71,G,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "72,H,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "73,I,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "74,J,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "75,K,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "76,L,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "77,M,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "78,N,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "79,O,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "80,P,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "81,Q,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "82,R,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "83,S,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "84,T,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "85,U,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "86,V,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "87,W,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "88,X,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "89,Y,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "90,Z,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "91,[,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "92,\,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "93,],Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "94,^,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "95,_,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "96,`,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "97,a,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "98,b,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "99,c,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "100,d,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "101,e,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "102,f,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "103,g,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "104,h,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "105,i,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "106,j,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "107,k,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "108,l,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "109,m,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "110,n,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "111,o,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "112,p,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "113,q,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "114,r,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "115,s,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "116,t,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "117,u,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "118,v,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "119,w,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "120,x,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "121,y,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "122,z,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "123,{,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "124,|,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "125,},Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "126,~,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "127,DEL,Printable": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "128,€,Euro Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "129,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "130,‚,Single Low-9 Quotation Mark": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "131,ƒ,Latin Small Letter F With Hook": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "132,„,Double Low-9 Quotation Mark": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "133,…,Horizontal Ellipsis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "134,†,Dagger": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "135,‡,Double Dagger": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "136,ˆ,Modifier Letter Circumflex Accent": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "137,‰,Per Mille Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "138,Š,Latin Capital Letter S With Caron": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "139,‹,Single Left-pointing Angle Quotation Mark": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "140,Œ,Latin Capital Ligature Oe": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "141,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "142,Ž,Latin Capital Letter Z With Caron": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "143,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "144,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "145,‘,Left Single Quotation Mark": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "146,’,Right Single Quotation Mark": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "147,“,Left Double Quotation Mark": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "148,”,Right Double Quotation Mark": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "149,•,Bullet": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "150,–,En Dash": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "151,—,Em Dash": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "152,˜,Small Tilde": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "153,™,Trade Mark Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "154,š,Latin Small Letter S With Caron": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "155,›,Single Right-pointing Angle Quotation Mark": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "156,œ,Latin Small Ligature Oe": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "157,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "158,ž,Latin Small Letter Z With Caron": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "159,Ÿ,Latin Capital Letter Y With Diaeresis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "160,Non Printing,No-break Space": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "161,¡,Inverted Exclamation Mark": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "162,¢,Cent Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "163,£,Pound Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "164,¤,Currency Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "165,¥,Yen Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "166,¦,Broken Bar": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "167,§,Section Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "168,¨,Diaeresis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "169,©,Copyright Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "170,ª,Feminine Ordinal Indicator": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "171,«,Left-pointing Double Angle Quotation Mark": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "172,¬,Not Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "173,,Soft Hyphen": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "174,®,Registered Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "175,¯,Macron": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "176,°,Degree Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "177,±,Plus-minus Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "178,²,Superscript Two": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "179,³,Superscript Three": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "180,´,Acute Accent": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "181,µ,Micro Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "182,¶,Pilcrow Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "183,·,Middle Dot": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "184,¸,Cedilla": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "185,¹,Superscript One": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "186,º,Masculine Ordinal Indicator": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "187,»,Right-pointing Double Angle Quotation Mark": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "188,¼,Vulgar Fraction One Quarter": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "189,½,Vulgar Fraction One Half": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "190,¾,Vulgar Fraction Three Quarters": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "191,¿,Inverted Question Mark": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "192,À,Latin Capital Letter A With Grave": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "193,Á,Latin Capital Letter A With Acute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "194,Â,Latin Capital Letter A With Circumflex": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "195,Ã,Latin Capital Letter A With Tilde": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "196,Ä,Latin Capital Letter A With Diaeresis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "197,Å,Latin Capital Letter A With Ring Above": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "198,Æ,Latin Capital Ligature Ae": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "199,Ç,Latin Capital Letter C With Cedilla": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "200,È,Latin Capital Letter E With Grave": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "201,É,Latin Capital Letter E With Acute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "202,Ê,Latin Capital Letter E With Circumflex": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "203,Ë,Latin Capital Letter E With Diaeresis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "204,Ì,Latin Capital Letter I With Grave": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "205,Í,Latin Capital Letter I With Acute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "206,Î,Latin Capital Letter I With Circumflex": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "207,Ï,Latin Capital Letter I With Diaeresis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "208,Ð,Latin Capital Letter Eth": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "209,Ñ,Latin Capital Letter N With Tilde": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "210,Ò,Latin Capital Letter O With Grave": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "211,Ó,Latin Capital Letter O With Acute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "212,Ô,Latin Capital Letter O With Circumflex": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "213,Õ,Latin Capital Letter O With Tilde": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "214,Ö,Latin Capital Letter O With Diaeresis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "215,×,Multiplication Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "216,Ø,Latin Capital Letter O With Stroke": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "217,Ù,Latin Capital Letter U With Grave": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "218,Ú,Latin Capital Letter U With Acute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "219,Û,Latin Capital Letter U With Circumflex": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "220,Ü,Latin Capital Letter U With Diaeresis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "221,Ý,Latin Capital Letter Y With Acute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "222,Þ,Latin Capital Letter Thorn": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "223,ß,Latin Small Letter Sharp S": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "224,à,Latin Small Letter A With Grave": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "225,á,Latin Small Letter A With Acute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "226,â,Latin Small Letter A With Circumflex": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "227,ã,Latin Small Letter A With Tilde": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "228,ä,Latin Small Letter A With Diaeresis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "229,å,Latin Small Letter A With Ring Above": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "230,æ,Latin Small Ligature Ae": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "231,ç,Latin Small Letter C With Cedilla": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "232,è,Latin Small Letter E With Grave": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "233,é,Latin Small Letter E With Acute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "234,ê,Latin Small Letter E With Circumflex": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "235,ë,Latin Small Letter E With Diaeresis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "236,ì,Latin Small Letter I With Grave": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "237,í,Latin Small Letter I With Acute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "238,î,Latin Small Letter I With Circumflex": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "239,ï,Latin Small Letter I With Diaeresis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "240,ð,Latin Small Letter Eth": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "241,ñ,Latin Small Letter N With Tilde": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "242,ò,Latin Small Letter O With Grave": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "243,ó,Latin Small Letter O With Acute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "244,ô,Latin Small Letter O With Circumflex": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "245,õ,Latin Small Letter O With Tilde": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "246,ö,Latin Small Letter O With Diaeresis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "247,÷,Division Sign": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "248,ø,Latin Small Letter O With Stroke": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "249,ù,Latin Small Letter U With Grave": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "250,ú,Latin Small Letter U With Acute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "251,û,Latin Small Letter U With Circumflex": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "252,ü,Latin Small Letter U With Diaeresis": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "253,ý,Latin Small Letter Y With Acute": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "254,þ,Latin Small Letter Thorn": AsciiCounter = AsciiCounter + 1
    AsciiArray(AsciiCounter) = "255,ÿ,Latin Small Letter Y With Diaeresis": AsciiCounter = AsciiCounter + 1

End Sub
 
Last edited by a moderator:

cmccall95

New Member
Joined
Nov 11, 2019
Messages
13
I had a similar problem and for me, this code helped resolve the problem.

It might be a starting point for you.

Public AsciiArray(300)

Public Sub AsciiTest()

strWorksheet = "<Active Worlsheet>"
strColumn = "<Columne to walk>"

Call MakeAcessArray
Worksheets(strWorksheet).Visible = True
Worksheets(strWorksheet).Select

For xCounter = 1 To 1000
If Range(strColumn & xCounter).Value = "" Then
'Exit Sub
End If
RemoveNonASCII (Range(strColumn & xCounter).Value)
Next

End Sub

Public Function RemoveNonASCII(str As String) As String
Dim i As Integer
For i = 1 To Len(str)
If AscW(Mid(str, i, 1)) < 127 Then 'It's an ASCII character
RemoveNonASCII = RemoveNonASCII & Mid(str, i, 1) 'Append it
Else
Debug.Print str
For Y = 1 To i - 1
SpaceCounter = SpaceCounter & " "
Next
Debug.Print SpaceCounter & "^Character #" & i & " Is illegal Ascii[" & AsciiArray(AscW(Mid(str, i, 1))) & "]"
End If
Next i
End Function

Public Sub MakeAcessArray()

AsciiCounter = 0
AsciiArray(AsciiCounter) = "0,Non Printing,null": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "1,Non Printing,start of heading": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "2,Non Printing,start of text": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "3,Non Printing,end of text": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "4,Non Printing,end of transmission": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "5,Non Printing,enquiry": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "6,Non Printing,acknowledge": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "7,Non Printing,bell": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "8,Non Printing,backspace": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "9,Non Printing,horizontal tab": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "10,Non Printing,new line": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "11,Non Printing,vertical tab": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "12,Non Printing,new page": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "13,Non Printing,carriage return": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "14,Non Printing,shift out": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "15,Non Printing,shift in": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "16,Non Printing,data link escape": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "17,Non Printing,device control 1": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "18,Non Printing,device control 2": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "19,Non Printing,device control 3": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "20,Non Printing,device control 4": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "21,Non Printing,negative acknowledge": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "22,Non Printing,synchronous idle": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "23,Non Printing,end of trans. block": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "24,Non Printing,cancel": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "25,Non Printing,end of medium": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "26,Non Printing,substitute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "27,Non Printing,escape": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "28,Non Printing,file separator": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "29,Non Printing,group separator": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "30,Non Printing,record separator": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "31,Non Printing,unit separator": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "32,Non Printing,space": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "33,!,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "34,“,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "35,#,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "36,$,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "37,%,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "38,&,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "39,‘,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "40,(,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "41,),Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "42,*,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "43,+,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "44,,,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "45,–,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "46,.,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "47,/,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "48,0,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "49,1,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "50,2,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "51,3,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "52,4,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "53,5,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "54,6,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "55,7,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "56,8,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "57,9,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "58,:,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "59,;,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "60,<,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "61,=,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "62,>,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "63,?,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "64,@,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "65,A,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "66,B,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "67,C,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "68,D,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "69,E,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "70,F,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "71,G,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "72,H,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "73,I,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "74,J,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "75,K,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "76,L,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "77,M,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "78,N,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "79,O,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "80,P,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "81,Q,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "82,R,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "83,S,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "84,T,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "85,U,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "86,V,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "87,W,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "88,X,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "89,Y,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "90,Z,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "91,[,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "92,\,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "93,],Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "94,^,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "95,_,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "96,`,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "97,a,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "98,b,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "99,c,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "100,d,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "101,e,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "102,f,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "103,g,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "104,h,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "105,i,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "106,j,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "107,k,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "108,l,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "109,m,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "110,n,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "111,o,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "112,p,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "113,q,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "114,r,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "115,s,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "116,t,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "117,u,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "118,v,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "119,w,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "120,x,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "121,y,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "122,z,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "123,{,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "124,|,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "125,},Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "126,~,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "127,DEL,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "128,€,Euro Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "129,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "130,‚,Single Low-9 Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "131,ƒ,Latin Small Letter F With Hook": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "132,„,Double Low-9 Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "133,…,Horizontal Ellipsis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "134,†,Dagger": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "135,‡,Double Dagger": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "136,ˆ,Modifier Letter Circumflex Accent": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "137,‰,Per Mille Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "138,Š,Latin Capital Letter S With Caron": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "139,‹,Single Left-pointing Angle Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "140,Œ,Latin Capital Ligature Oe": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "141,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "142,Ž,Latin Capital Letter Z With Caron": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "143,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "144,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "145,‘,Left Single Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "146,’,Right Single Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "147,“,Left Double Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "148,”,Right Double Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "149,•,Bullet": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "150,–,En Dash": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "151,—,Em Dash": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "152,˜,Small Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "153,™,Trade Mark Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "154,š,Latin Small Letter S With Caron": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "155,›,Single Right-pointing Angle Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "156,œ,Latin Small Ligature Oe": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "157,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "158,ž,Latin Small Letter Z With Caron": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "159,Ÿ,Latin Capital Letter Y With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "160,Non Printing,No-break Space": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "161,¡,Inverted Exclamation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "162,¢,Cent Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "163,£,Pound Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "164,¤,Currency Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "165,¥,Yen Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "166,¦,Broken Bar": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "167,§,Section Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "168,¨,Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "169,©,Copyright Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "170,ª,Feminine Ordinal Indicator": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "171,«,Left-pointing Double Angle Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "172,¬,Not Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "173,,Soft Hyphen": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "174,®,Registered Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "175,¯,Macron": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "176,°,Degree Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "177,±,Plus-minus Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "178,²,Superscript Two": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "179,³,Superscript Three": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "180,´,Acute Accent": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "181,µ,Micro Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "182,¶,Pilcrow Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "183,·,Middle Dot": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "184,¸,Cedilla": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "185,¹,Superscript One": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "186,º,Masculine Ordinal Indicator": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "187,»,Right-pointing Double Angle Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "188,¼,Vulgar Fraction One Quarter": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "189,½,Vulgar Fraction One Half": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "190,¾,Vulgar Fraction Three Quarters": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "191,¿,Inverted Question Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "192,À,Latin Capital Letter A With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "193,Á,Latin Capital Letter A With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "194,Â,Latin Capital Letter A With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "195,Ã,Latin Capital Letter A With Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "196,Ä,Latin Capital Letter A With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "197,Å,Latin Capital Letter A With Ring Above": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "198,Æ,Latin Capital Ligature Ae": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "199,Ç,Latin Capital Letter C With Cedilla": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "200,È,Latin Capital Letter E With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "201,É,Latin Capital Letter E With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "202,Ê,Latin Capital Letter E With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "203,Ë,Latin Capital Letter E With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "204,Ì,Latin Capital Letter I With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "205,Í,Latin Capital Letter I With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "206,Î,Latin Capital Letter I With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "207,Ï,Latin Capital Letter I With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "208,Ð,Latin Capital Letter Eth": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "209,Ñ,Latin Capital Letter N With Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "210,Ò,Latin Capital Letter O With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "211,Ó,Latin Capital Letter O With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "212,Ô,Latin Capital Letter O With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "213,Õ,Latin Capital Letter O With Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "214,Ö,Latin Capital Letter O With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "215,×,Multiplication Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "216,Ø,Latin Capital Letter O With Stroke": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "217,Ù,Latin Capital Letter U With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "218,Ú,Latin Capital Letter U With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "219,Û,Latin Capital Letter U With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "220,Ü,Latin Capital Letter U With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "221,Ý,Latin Capital Letter Y With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "222,Þ,Latin Capital Letter Thorn": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "223,ß,Latin Small Letter Sharp S": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "224,à,Latin Small Letter A With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "225,á,Latin Small Letter A With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "226,â,Latin Small Letter A With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "227,ã,Latin Small Letter A With Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "228,ä,Latin Small Letter A With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "229,å,Latin Small Letter A With Ring Above": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "230,æ,Latin Small Ligature Ae": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "231,ç,Latin Small Letter C With Cedilla": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "232,è,Latin Small Letter E With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "233,é,Latin Small Letter E With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "234,ê,Latin Small Letter E With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "235,ë,Latin Small Letter E With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "236,ì,Latin Small Letter I With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "237,í,Latin Small Letter I With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "238,î,Latin Small Letter I With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "239,ï,Latin Small Letter I With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "240,ð,Latin Small Letter Eth": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "241,ñ,Latin Small Letter N With Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "242,ò,Latin Small Letter O With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "243,ó,Latin Small Letter O With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "244,ô,Latin Small Letter O With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "245,õ,Latin Small Letter O With Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "246,ö,Latin Small Letter O With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "247,÷,Division Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "248,ø,Latin Small Letter O With Stroke": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "249,ù,Latin Small Letter U With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "250,ú,Latin Small Letter U With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "251,û,Latin Small Letter U With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "252,ü,Latin Small Letter U With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "253,ý,Latin Small Letter Y With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "254,þ,Latin Small Letter Thorn": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "255,ÿ,Latin Small Letter Y With Diaeresis": AsciiCounter = AsciiCounter + 1

End Sub
Ok this could be helpful. What did you end up doing? Did you replace or remove the characters? This code is just supposed to print the "illegal" characters to the immediate window, correct?
 

cmccall95

New Member
Joined
Nov 11, 2019
Messages
13
I had a similar problem and for me, this code helped resolve the problem.

It might be a starting point for you.

Public AsciiArray(300)

Public Sub AsciiTest()

strWorksheet = "<Active Worlsheet>"
strColumn = "<Columne to walk>"

Call MakeAcessArray
Worksheets(strWorksheet).Visible = True
Worksheets(strWorksheet).Select

For xCounter = 1 To 1000
If Range(strColumn & xCounter).Value = "" Then
'Exit Sub
End If
RemoveNonASCII (Range(strColumn & xCounter).Value)
Next

End Sub

Public Function RemoveNonASCII(str As String) As String
Dim i As Integer
For i = 1 To Len(str)
If AscW(Mid(str, i, 1)) < 127 Then 'It's an ASCII character
RemoveNonASCII = RemoveNonASCII & Mid(str, i, 1) 'Append it
Else
Debug.Print str
For Y = 1 To i - 1
SpaceCounter = SpaceCounter & " "
Next
Debug.Print SpaceCounter & "^Character #" & i & " Is illegal Ascii[" & AsciiArray(AscW(Mid(str, i, 1))) & "]"
End If
Next i
End Function

Public Sub MakeAcessArray()

AsciiCounter = 0
AsciiArray(AsciiCounter) = "0,Non Printing,null": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "1,Non Printing,start of heading": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "2,Non Printing,start of text": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "3,Non Printing,end of text": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "4,Non Printing,end of transmission": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "5,Non Printing,enquiry": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "6,Non Printing,acknowledge": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "7,Non Printing,bell": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "8,Non Printing,backspace": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "9,Non Printing,horizontal tab": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "10,Non Printing,new line": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "11,Non Printing,vertical tab": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "12,Non Printing,new page": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "13,Non Printing,carriage return": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "14,Non Printing,shift out": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "15,Non Printing,shift in": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "16,Non Printing,data link escape": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "17,Non Printing,device control 1": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "18,Non Printing,device control 2": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "19,Non Printing,device control 3": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "20,Non Printing,device control 4": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "21,Non Printing,negative acknowledge": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "22,Non Printing,synchronous idle": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "23,Non Printing,end of trans. block": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "24,Non Printing,cancel": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "25,Non Printing,end of medium": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "26,Non Printing,substitute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "27,Non Printing,escape": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "28,Non Printing,file separator": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "29,Non Printing,group separator": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "30,Non Printing,record separator": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "31,Non Printing,unit separator": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "32,Non Printing,space": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "33,!,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "34,“,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "35,#,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "36,$,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "37,%,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "38,&,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "39,‘,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "40,(,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "41,),Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "42,*,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "43,+,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "44,,,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "45,–,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "46,.,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "47,/,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "48,0,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "49,1,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "50,2,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "51,3,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "52,4,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "53,5,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "54,6,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "55,7,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "56,8,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "57,9,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "58,:,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "59,;,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "60,<,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "61,=,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "62,>,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "63,?,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "64,@,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "65,A,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "66,B,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "67,C,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "68,D,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "69,E,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "70,F,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "71,G,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "72,H,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "73,I,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "74,J,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "75,K,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "76,L,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "77,M,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "78,N,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "79,O,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "80,P,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "81,Q,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "82,R,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "83,S,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "84,T,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "85,U,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "86,V,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "87,W,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "88,X,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "89,Y,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "90,Z,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "91,[,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "92,\,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "93,],Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "94,^,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "95,_,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "96,`,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "97,a,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "98,b,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "99,c,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "100,d,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "101,e,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "102,f,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "103,g,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "104,h,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "105,i,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "106,j,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "107,k,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "108,l,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "109,m,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "110,n,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "111,o,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "112,p,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "113,q,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "114,r,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "115,s,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "116,t,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "117,u,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "118,v,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "119,w,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "120,x,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "121,y,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "122,z,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "123,{,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "124,|,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "125,},Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "126,~,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "127,DEL,Printable": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "128,€,Euro Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "129,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "130,‚,Single Low-9 Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "131,ƒ,Latin Small Letter F With Hook": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "132,„,Double Low-9 Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "133,…,Horizontal Ellipsis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "134,†,Dagger": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "135,‡,Double Dagger": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "136,ˆ,Modifier Letter Circumflex Accent": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "137,‰,Per Mille Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "138,Š,Latin Capital Letter S With Caron": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "139,‹,Single Left-pointing Angle Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "140,Œ,Latin Capital Ligature Oe": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "141,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "142,Ž,Latin Capital Letter Z With Caron": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "143,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "144,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "145,‘,Left Single Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "146,’,Right Single Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "147,“,Left Double Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "148,”,Right Double Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "149,•,Bullet": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "150,–,En Dash": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "151,—,Em Dash": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "152,˜,Small Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "153,™,Trade Mark Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "154,š,Latin Small Letter S With Caron": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "155,›,Single Right-pointing Angle Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "156,œ,Latin Small Ligature Oe": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "157,Undefined,Undefined": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "158,ž,Latin Small Letter Z With Caron": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "159,Ÿ,Latin Capital Letter Y With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "160,Non Printing,No-break Space": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "161,¡,Inverted Exclamation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "162,¢,Cent Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "163,£,Pound Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "164,¤,Currency Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "165,¥,Yen Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "166,¦,Broken Bar": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "167,§,Section Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "168,¨,Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "169,©,Copyright Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "170,ª,Feminine Ordinal Indicator": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "171,«,Left-pointing Double Angle Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "172,¬,Not Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "173,,Soft Hyphen": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "174,®,Registered Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "175,¯,Macron": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "176,°,Degree Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "177,±,Plus-minus Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "178,²,Superscript Two": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "179,³,Superscript Three": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "180,´,Acute Accent": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "181,µ,Micro Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "182,¶,Pilcrow Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "183,·,Middle Dot": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "184,¸,Cedilla": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "185,¹,Superscript One": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "186,º,Masculine Ordinal Indicator": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "187,»,Right-pointing Double Angle Quotation Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "188,¼,Vulgar Fraction One Quarter": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "189,½,Vulgar Fraction One Half": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "190,¾,Vulgar Fraction Three Quarters": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "191,¿,Inverted Question Mark": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "192,À,Latin Capital Letter A With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "193,Á,Latin Capital Letter A With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "194,Â,Latin Capital Letter A With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "195,Ã,Latin Capital Letter A With Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "196,Ä,Latin Capital Letter A With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "197,Å,Latin Capital Letter A With Ring Above": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "198,Æ,Latin Capital Ligature Ae": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "199,Ç,Latin Capital Letter C With Cedilla": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "200,È,Latin Capital Letter E With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "201,É,Latin Capital Letter E With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "202,Ê,Latin Capital Letter E With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "203,Ë,Latin Capital Letter E With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "204,Ì,Latin Capital Letter I With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "205,Í,Latin Capital Letter I With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "206,Î,Latin Capital Letter I With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "207,Ï,Latin Capital Letter I With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "208,Ð,Latin Capital Letter Eth": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "209,Ñ,Latin Capital Letter N With Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "210,Ò,Latin Capital Letter O With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "211,Ó,Latin Capital Letter O With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "212,Ô,Latin Capital Letter O With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "213,Õ,Latin Capital Letter O With Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "214,Ö,Latin Capital Letter O With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "215,×,Multiplication Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "216,Ø,Latin Capital Letter O With Stroke": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "217,Ù,Latin Capital Letter U With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "218,Ú,Latin Capital Letter U With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "219,Û,Latin Capital Letter U With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "220,Ü,Latin Capital Letter U With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "221,Ý,Latin Capital Letter Y With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "222,Þ,Latin Capital Letter Thorn": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "223,ß,Latin Small Letter Sharp S": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "224,à,Latin Small Letter A With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "225,á,Latin Small Letter A With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "226,â,Latin Small Letter A With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "227,ã,Latin Small Letter A With Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "228,ä,Latin Small Letter A With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "229,å,Latin Small Letter A With Ring Above": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "230,æ,Latin Small Ligature Ae": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "231,ç,Latin Small Letter C With Cedilla": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "232,è,Latin Small Letter E With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "233,é,Latin Small Letter E With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "234,ê,Latin Small Letter E With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "235,ë,Latin Small Letter E With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "236,ì,Latin Small Letter I With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "237,í,Latin Small Letter I With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "238,î,Latin Small Letter I With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "239,ï,Latin Small Letter I With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "240,ð,Latin Small Letter Eth": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "241,ñ,Latin Small Letter N With Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "242,ò,Latin Small Letter O With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "243,ó,Latin Small Letter O With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "244,ô,Latin Small Letter O With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "245,õ,Latin Small Letter O With Tilde": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "246,ö,Latin Small Letter O With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "247,÷,Division Sign": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "248,ø,Latin Small Letter O With Stroke": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "249,ù,Latin Small Letter U With Grave": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "250,ú,Latin Small Letter U With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "251,û,Latin Small Letter U With Circumflex": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "252,ü,Latin Small Letter U With Diaeresis": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "253,ý,Latin Small Letter Y With Acute": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "254,þ,Latin Small Letter Thorn": AsciiCounter = AsciiCounter + 1
AsciiArray(AsciiCounter) = "255,ÿ,Latin Small Letter Y With Diaeresis": AsciiCounter = AsciiCounter + 1

End Sub
I guess what I'm trying to ask is, Are those characters supposed to be converted? Or are they supposed to be removed? I modified your code to remove them for now. I'm just not sure what caused that to begin with.
 

yky

Well-known Member
Joined
Jun 7, 2011
Messages
1,875
Office Version
  1. 2010
Platform
  1. Windows

ADVERTISEMENT

Perhaps the 8th bits have been stripped off when saving as CSV files? Can the senders of the CSV files open the CSV files and see the correct characters, not the odd characters?
 

RayFrye

Board Regular
Joined
Jan 31, 2005
Messages
122
Office Version
  1. 365
  2. 2019
Yes, this code just identifies in the intermediate window the "in question" character. I was interested in where the character was located as I didn't have that many. My code can be modified to replace the "in question" character(s) with a space.
My problem was data that was transferred via email, strange characters found their way into the data.
The strange characters did not show up at all and were invisible and looked like a space but code compare failed.
 

cmccall95

New Member
Joined
Nov 11, 2019
Messages
13

ADVERTISEMENT

Perhaps the 8th bits have been stripped off when saving as CSV files? Can the senders of the CSV files open the CSV files and see the correct characters, not the odd characters?
I am wondering the same. I reached out but will likely not get a response until early in the morning as they are 7 hours ahead. From my understanding, they downloaded all the files from their CRM type system. I am assuming the problem lies there.
 

cmccall95

New Member
Joined
Nov 11, 2019
Messages
13
I am honestly unsure of how to proceed. For example, "GarcÃa" should be "Garcia". I assume this because his full name is in his email. Replacing the character would leave "Garca". I am thinking this is going to be an even bigger problem because I can see the origin country of the entries and there are hundreds( China, Africa, Taiwan, France, Portugal, Romania, Ukraine, Russia, Spain, Mexico, etc.) Maybe it is best to figure out a different method for when creating the CSV.
 

RayFrye

Board Regular
Joined
Jan 31, 2005
Messages
122
Office Version
  1. 365
  2. 2019
You are right, you need to determine how these strange characters find there way into the file.
In my case, some email packet modified the string.
 

Marc L

Well-known Member
Joined
Apr 5, 2021
Messages
1,238
Office Version
  1. 2010
Platform
  1. Windows
Is there maybe a VBA code out there that can loop and convert these to whatever they are supposed to be?
Yes if the coding characters can be known - easy just asking the creator of the source csv text files ! -​
some ways exist directly under VBA / Windows as you can find on Net, in fact whatever the coding language …​
For further help I need you link a source csv text file in a files host website like Dropbox for example.​
 

Forum statistics

Threads
1,141,060
Messages
5,704,041
Members
421,323
Latest member
Exidous

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top