I have a csv files with some special characters such as ‘è’ instead of ‘é’ (the csv file is in french).
So basically I referenced all the special characters and I am trying to write a code with VBA to do it. Unfortunatelly it is not working.
My code is :
Sub ReplaceTest()
' I referenced 35 issues
Dim replaceWhat(35) As Variant
Dim replaceBy(35) As Variant
' This is where I reference the special caracters and link them to the good ones
Application.Sheets("SpecialCaracters").Select
replaceWhat(35) = Application.Range("A1:A35").Value
replaceBy(35) = Application.Range("B1:B35").Value
Dim i As Integer
For i = 0 To 34
Application.Sheets("Sheet1").Select
ActiveSheet.Columns("A:AH").Select
Selection.Replace What:=remplacerWhat(i), Replacement:=remplacerBy(i), LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Next i
End Sub
Any idea? Thanks
Assuming you having something like this:
You can use the following method to iterate through all special character rows and replace the occurrences in another sheet or range.