How to replace accented characters with regular characters in Excel?
Have you received some reports with accented characters in Microsoft Excel? It looks tedious to go through the whole workbook, and replace accented characters to regular ones manually, such as "û" to "u". And this article will introduce some tricky things to quickly replace accented characters with regular characters in Excel.
For users who are experienced with Microsoft Excel, using VBA macro is an easy way to deal with this complicated work.
1. Hold down the Alt + F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following macro in the Module Window.
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
3. Then go to a blank cell and paste the formula in a cell: =CheckStringCHAR(InString), for example =CheckStringCHAR("ù"), or =CheckStringCHAR(A2).
(1) Your Microsoft Visual Basic may not recognize accented characters at all, if it does not support Unicode. For example, when you paste the "š" in the Visual Basic, you may get "?". If so, this macro is not available.
(2) It does not replace accented characters in the strings of selected cell directly.
It requires too much skills and knowledge to use VBA macro. And the following method will help you work easier with only some clicks. Kutools for Excel's Replace Accented Characters tool makes it possible for you to replace all kinds of accented characters with regular characters easily at once.
1. Select the range in which you will replace all accented characters.
2. Click Kutools > Text > Replace Accented Characters…, see screenshot:
3. In Replace Accented Characters dialog box, click the Select all button to select all replace rules, and click the Ok button to replace all accented characters. see screenshot:
(1) If there are not some specific accented characters you want, you can click the Add rule button to add your own rules into the list box in above Replace Accented Characters dialog.
(2) You can customize new replacing rules in the Replace Accented Characters dialog box.
Now you will have all accented characters in strings of selected range converted to regular characters immediately. See screenshot:
You are guest
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 2 months agoI have added the code and it work perfectly however I need to add more accent to the code as I´m missing polish accents. How can I edit the code and add those accents? I try to do it in a notepad and then paste again the code but it change the letter back to normal characters. I'm not an expert so I really need your help please!
- To post as a guest, your comment is unpublished.· 9 months agoThe VBA function StripAccent() worked like a charm, thank you very much for it. But I would like to ask what exactly does this "* 1" at at the end of "Dim A As String * 1" initialization string, I've never seen that before and I wasn't able to find an answer to that myself so far.
- To post as a guest, your comment is unpublished.· 1 years agowhen you remove special character it also remove the space between the text ??
- To post as a guest, your comment is unpublished.· 2 years agois it possible to replace multiple characters with another character? There is no way to say I want to replace Ã© by é
How can I do mass replacements like this in Kutools for Excel? I like the multireplace functionality but it would be a lot more useful if replacement of entire words would be possible. Anyboy any idea how I can do this?
- To post as a guest, your comment is unpublished.· 3 years agoIf you are looking to replace a specific accent character (ex. é), you can do a Find and Replace All (search for "é" and replace with "e"). This solved my problem.
- To post as a guest, your comment is unpublished.· 2 years agoNo shit Sherlock
- To post as a guest, your comment is unpublished.· 4 years agoHello,
Excellent Macro. Thanks for posting this. However I am wondering if I want to replace all of the characters in the excel file, how can I do that at once?
- To post as a guest, your comment is unpublished.· 5 years agoOn the "Replace accented characters with regular characters with VBA" part, step 3, you must replace CheckStringCHAR for STRIPACCENT, which is the name of the function in the provided code!