Sub aDiakritika_RemoveL() Call aDiakritika_Remove_x("L") End Sub Sub aDiakritika_RemoveU() Call aDiakritika_Remove_x("U") End Sub Sub aDiakritika_Remove() Call aDiakritika_Remove_x End Sub Sub aDiakritika_Remove_x(Optional xCase As String) ' ReplaZnakyPrePolia Macro ' Macro recorded 18.2.2006 by PC-PROG ' Dim xCo(), xZa(), xRng As Range, c As Range Dim i As Long xCo = Array("ý", "ú", "í", "é", "ě", "á", "ä", "ó", "ô", "č", "ď", "ľ", "ĺ", "ň", "ř", "ŕ", "š", "ť", "ž", " ", ".", "-", ")", "(", "]", "[", ",", "/", "\") xZa = Array("y", "u", "i", "e", "e", "a", "a", "o", "o", "c", "d", "l", "l", "n", "r", "r", "s", "t", "z", "_", "_", "_", "", "", "", "", "", "_", "_") Set xRng = Selection For i = LBound(xCo) To UBound(xCo) xRng.Replace What:=xCo(i), Replacement:=xZa(i), LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False xRng.Replace What:=UCase(xCo(i)), Replacement:=UCase(xZa(i)), LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Next i If xCase <> "" Then For Each c In xRng c.Value = IIf(xCase = "U", UCase(c.Text), LCase(c.Text)) Next c End If Set xRng = Nothing End Sub
Užitočné (2) | zk24, 2009 |
xCo = Array("ý", "ú", "í", "é", "ě", "á", "ä", "ó", "ô", "č", "ď", "ľ", "ĺ", "ň", "ř", "ŕ", "š", "ť", "ž") xZa = Array("y", "u", "i", "e", "e", "a", "a", "o", "o", "c", "d", "l", "l", "n", "r", "r", "s", "t", "z")
Užitočné (1) | 2009 |
Užitočné (1) | PaloPa |
Text v Excel bez diakritiky.