Functionモジュールでreplace関数を並べて、クエリから呼び出します。
Public Function MOJI_EXCHANGE(A As Variant)
If InStr(A, “かっ”) Then
GAIJI_EXCHANGE = Replace(A, “moji A”, “mojiB”)
ElseIf InStr(A, “mojiC”) Then
GAIJI_EXCHANGE = Replace(A, ” mojiC”, “mojiD”)
ElseIf InStr(A, “mojiE”) Then
GAIJI_EXCHANGE = Replace(A, “mojiE”, “mojiF”)
Else
GAIJI_EXCHANGE = A
End If
End Function