Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7629551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:51:47+00:00 2026-05-31T05:51:47+00:00

I have a csv files with some special characters such as ‘è’ instead of

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:51:48+00:00Added an answer on May 31, 2026 at 5:51 am

    Assuming you having something like this:

    SpecialCharacters Sheet
    \ | A | B
    1 | à | a
    2 | é | e
    3 | ó | o
    

    You can use the following method to iterate through all special character rows and replace the occurrences in another sheet or range.

    Option Explicit
    
    Sub ReplaceSpecialCharacters(ReplaceRange As Range)
        Dim SpecialCharSheet As Worksheet
        Dim replaceWhat As String
        Dim replaceBy  As String
        Dim RowIndex As Long
    
        Set SpecialCharSheet = Sheets("SpecialCharacters")
        For RowIndex = 1 To SpecialCharSheet.UsedRange.Rows.Count
            replaceWhat = SpecialCharSheet.Cells(RowIndex, 1).Value
            replaceBy = SpecialCharSheet.Cells(RowIndex, 2).Value
    
            ReplaceRange.Replace What:=replaceWhat, Replacement:=replaceBy, _
                LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
                SearchFormat:=False, ReplaceFormat:=False
        Next RowIndex
    End Sub
    
    Sub ReplaceSheet1()
        ' If using hard coded range
        ReplaceSpecialCharacters Sheet1.Columns("A:AH")
    
        ' If using Selection
        ReplaceSpecialCharacters Selection
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some .csv files which I'm using as part of a test bench.
I am processing some CSV file which i have copied in Bin folder of
I have a large collection of data in an excel file (and csv files).
I have some CSV files that I need uploaded to a site I'm writing
I have multiple .csv files and I combined them in single .csv file with
I have some CSV data files that I want to import into mySQL. I
I have an CSV file with city names stored, some of these city name
We have a some ETL processes that read CSV files that are output from
I'm trying to read CSV files using Java. Some of the files may have
I have some CSV files where I need to delete all lines that contain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.