DonAndress
Active Member
- Joined
- Sep 25, 2011
- Messages
- 362
- Office Version
- 2019
- 2016
- Platform
- Windows
Hello.
I have English Excel 2010 with additional Polish language installed (both for edit and for layout).
Now, I have a column with multiple names but these names are Polish, meaning, there are many Polish characters.
I'd like to remove those Polish letters with English equivalent, therefore I have a below code:
But this just doesn't work.
Seems like Excel (VBA) doesn't recognize Polish characters because this is what I got from recording the macro when I used Ctrl+H to replace "ą" with "a":
The thing is that Excel replaces Polish characters without any problem.
Is there any workaround to force VBA to recognize it?
I have English Excel 2010 with additional Polish language installed (both for edit and for layout).
Now, I have a column with multiple names but these names are Polish, meaning, there are many Polish characters.
I'd like to remove those Polish letters with English equivalent, therefore I have a below code:
Code:
Dim PoleZzz()
Dim PoleBez()
PoleZzz = Array("ą", "ć", "ę", "ń", "ó", "ł", "ś", "ż", "ź") 'Polish
PoleBez = Array("a", "c", "e", "n", "o", "l", "s", "z", "z") 'English
For i = 0 To 8
Workbooks(MacroWkb).Sheets("Data").Range("B14:B20").Replace What:=PoleZzz(i), Replacement:=PoleBez(i), LookAt:=xlPart, SearchOrder:=xlByColumns, MatchCase:=False
Next i
But this just doesn't work.
Seems like Excel (VBA) doesn't recognize Polish characters because this is what I got from recording the macro when I used Ctrl+H to replace "ą" with "a":
Code:
Selection.Replace What:="a", Replacement:="a", LookAt:=xlPart, SearchOrder:=xlByColumns, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
The thing is that Excel replaces Polish characters without any problem.
Is there any workaround to force VBA to recognize it?