How to identify diacritics?

LaurenJez

New Member
Joined
Apr 19, 2023
Messages
11
Office Version
  1. 2016
Platform
  1. Windows
Hello. I have a large Excel file that contains first and last names. Some of the names have special characters called diacritics, such as a tilde Ñ or ñ. Is there a way to easily scan the names to look for diacritics -- other than a basic search? The issue is that if I load the file to a process we have, the names do not get loaded because of an error, so I have to edit the names first before loading and I need a way to easily pull the impacted persons.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Something like this...

LJ
ABC
1After VBAOriginal
2AlonsoAlonso
3AlvarezÁlvarez
4BlancoBlanco
5CastroCastro
6DelgadoDelgado
7DiazDíaz
8DominguezDomínguez
9FernandezFernández
10GarciaGarcía
11GilGil
12GomezGómez
13GonzalezGonzález
14GutierrezGutiérrez
15HernandezHernández
16IglesiasIglesias
17JimenezJiménez
18LopezLópez
19MartinMartín
20MartinezMartínez
21MolinaMolina
22MoralesMorales
23MorenoMoreno
24MunozMuñoz
25NavarroNavarro
26OrtegaOrtega
27OrtizOrtiz
28PerezPérez
29RamirezRamírez
30RamosRamos
31RodriguezRodríguez
32RomeroRomero
33RubioRubio
34RuizRuiz
35SanchezSánchez
36SanzSanz
37SerranoSerrano
38SuarezSuárez
39TorresTorres
40VazquezVázquez
Sheet2


VBA Code:
Sub DIARCITIC()
Dim DC() As Variant:    DC = Array("Á", "á", "É", "é", "Í", "í", "Ó", "ó", "Ú", "ú", "Ñ", "ñ")
Dim EN() As Variant:    EN = Array("A", "a", "E", "e", "I", "i", "O", "o", "U", "u", "N", "n")
Dim r As Range:         Set r = Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row)
Dim AR() As Variant:    AR = r.Value2

For i = 1 To UBound(AR)
    For j = 0 To UBound(DC)
        AR(i, 1) = Replace(AR(i, 1), DC(j), EN(j))
    Next j
Next i

r.Value2 = AR
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,583
Members
449,174
Latest member
chandan4057

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
Back
Top