Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Looking for an easy way to replace letters with acutes
Is there an easy way to change letters with acutes to letters without acutes
(i.e. replace á with a, é with e, ó with o, etc.) without doing a Find/Replace on every vowel individually? |
#2
|
|||
|
|||
As far as I know, no. They are distinct separate characters in the system
and not related to a or e other than looks. HTH. Best wishes Harald "Speak-ezy" skrev i melding ... Is there an easy way to change letters with acutes to letters without acutes (i.e. replace á with a, é with e, ó with o, etc.) without doing a Find/Replace on every vowel individually? |
#3
|
|||
|
|||
Hi,
You would have to use a VBA function for that (see below). Via a sub You can also invoque that function on every non-formula cell of column A Regards, Daniel M. Sub ChangeAllColA() Dim C as Range For each C in InterSect(ActiveSheet.UsedRange,Range("A:A")) If Not C.HasFormula Then C.Value = Virer_Accents(C.Value) End If Next C End Sub 'AV Function Virer_Accents$(Chaine$) Dim i As Integer, j As Integer Dim x As String j = Len(Chaine$) For i = 1 To j x = Asc(mid(Chaine$, i, 1)) Select Case x Case 192 To 197: x = "A" Case 200 To 203: x = "E" Case 204 To 207: x = "I" Case 209: x = "N" Case 210 To 214: x = "O" Case 217 To 220: x = "U" Case 221: x = "Y" Case 224 To 229: x = "a" Case 232 To 235: x = "e" Case 236 To 239: x = "i" Case 241: x = "n" Case 240, 242 To 246: x = "o" Case 249 To 252: x = "u" Case 253, 255: x = "y" Case Else: x = Chr(x) End Select Virer_Accents = Virer_Accents & x Next End Function 'AV "Speak-ezy" wrote in message ... Is there an easy way to change letters with acutes to letters without acutes (i.e. replace á with a, é with e, ó with o, etc.) without doing a Find/Replace on every vowel individually? |
#4
|
|||
|
|||
Thank you very much for taking the time to provide this solution!
"Daniel.M" wrote: Hi, You would have to use a VBA function for that (see below). Via a sub You can also invoque that function on every non-formula cell of column A Regards, Daniel M. Sub ChangeAllColA() Dim C as Range For each C in InterSect(ActiveSheet.UsedRange,Range("A:A")) If Not C.HasFormula Then C.Value = Virer_Accents(C.Value) End If Next C End Sub 'AV Function Virer_Accents$(Chaine$) Dim i As Integer, j As Integer Dim x As String j = Len(Chaine$) For i = 1 To j x = Asc(mid(Chaine$, i, 1)) Select Case x Case 192 To 197: x = "A" Case 200 To 203: x = "E" Case 204 To 207: x = "I" Case 209: x = "N" Case 210 To 214: x = "O" Case 217 To 220: x = "U" Case 221: x = "Y" Case 224 To 229: x = "a" Case 232 To 235: x = "e" Case 236 To 239: x = "i" Case 241: x = "n" Case 240, 242 To 246: x = "o" Case 249 To 252: x = "u" Case 253, 255: x = "y" Case Else: x = Chr(x) End Select Virer_Accents = Virer_Accents & x Next End Function 'AV "Speak-ezy" wrote in message ... Is there an easy way to change letters with acutes to letters without acutes (i.e. replace á with a, é with e, ó with o, etc.) without doing a Find/Replace on every vowel individually? |
#5
|
|||
|
|||
Thank you very much for taking the time to provide this solution! You're welcome. Your feedback is appreciated. Daniel M. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
no row numbers or column letters DISPLAYED | Excel Discussion (Misc queries) | |||
Excel column headings from numbers to letters | Excel Discussion (Misc queries) | |||
Replace using wildcards | Excel Discussion (Misc queries) | |||
macro to Find Replace in Excel | Excel Discussion (Misc queries) | |||
VB Find and Replace | Excel Worksheet Functions |