Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Speak-ezy
 
Posts: n/a
Default 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   Report Post  
Harald Staff
 
Posts: n/a
Default

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   Report Post  
Daniel.M
 
Posts: n/a
Default

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   Report Post  
Speak-ezy
 
Posts: n/a
Default

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   Report Post  
Daniel.M
 
Posts: n/a
Default


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
no row numbers or column letters DISPLAYED RagDyer Excel Discussion (Misc queries) 4 April 24th 23 03:42 AM
Excel column headings from numbers to letters happygolucky Excel Discussion (Misc queries) 2 January 21st 05 06:15 PM
Replace using wildcards jeb Excel Discussion (Misc queries) 6 January 6th 05 03:35 PM
macro to Find Replace in Excel Nurddin Excel Discussion (Misc queries) 7 January 3rd 05 04:29 AM
VB Find and Replace Bony_Pony Excel Worksheet Functions 10 December 6th 04 05:45 PM


All times are GMT +1. The time now is 09:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"