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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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,224,895
Messages
6,181,619
Members
453,057
Latest member
LE102024

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