How to Replace Accented Characters With Regular Characters in Excel?


Diacritical marks, often known as accented characters, are frequently employed in a variety of languages to denote particular phonetic or linguistic nuances. To make data processing and analysis easier, there are times when you might need to remove certain accents and convert them to their regular counterparts. You will be given step-by-step directions on how to carry out this activity in Microsoft Excel in this tutorial.

You will have a strong understanding of how to use built-in Excel functions, formulae, and other practical ways to replace accented characters with regular characters by the end of this session. So let's get started and discover how to eliminate those annoying accents to make your Excel data more consistent and accessible!

Replace Accented Characters With Regular Characters

Here, we will first create a VBA module and then run it to complete the task. So let us see a simple process to learn how you can replace accented characters with regular characters in Excel.

Step 1

Consider an Excel sheet where you have a list of accented characters similar to the below image.

First, right-click on the sheet name and select View code to open the VBA application.

Right-click > View Code.

Step 2

Then click on Insert and select Module, then copy the below code into the text box.

Insert > Module > Copy.

Code

Function StripAccent(thestring As String)
Dim A As String * 1
Dim B As String * 1
Dim i As Integer
Const AccChars= "ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ"
Const RegChars= "SZszYAAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyy"
For i = 1 To Len(AccChars)
A = Mid(AccChars, i, 1)
B = Mid(RegChars, i, 1)
thestring = Replace(thestring, A, B)
Next
StripAccent = thestring
End Function

Step 3

Then close VBA using Alt + Q. Then click on an empty cell and enter the formula as =StripAccent(A2) and click enter. Then drag down using the autofill handle.

Alt + Q > Empty Cell > Formula > Enter > Drag.

This is how you can replace accented characters in Excel.

Conclusion

In this tutorial, we have used a simple example to demonstrate how you can replace accented characters with regular characters in Excel to highlight a particular set of data.

Updated on: 27-Sep-2023

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements