Forum Discussion

Isty_Ahmad's avatar
Isty_Ahmad
Copper Contributor
Aug 02, 2022
Solved

How to find/replace Japanese characters in Excel VBA code

Hi, Looking for some help please in how to find/replace japanese characters  with VBA in Excel. I basically have a monthly report i get in a mixture of Japanese Shift format and English, and I can...
  • OliverScheurich's avatar
    Aug 02, 2022

    Isty_Ahmad 

    Sub japanese()
    
    Dim var As Variant
    Dim i As Long
    Dim j As Integer
    Dim maxrow As Long
    
    Application.ScreenUpdating = False
    
    Range("B:B").Clear
    
    maxrow = Cells(Rows.Count, 1).End(xlUp).Row
    For i = 1 To maxrow
    If Not IsEmpty(Cells(i, 1)) Then
    
    var = Application.Match(Cells(i, 1), Range("E1:E50"), 0)
    
    If Not IsError(var) Then
    j = Application.Match(Cells(i, 1), Range("E1:E50"), 0)
    Cells(i, 2).Value = Cells(j, 6).Value
    Else
    End If
    Else
    End If
    
    Next i
    
    Application.ScreenUpdating = True
    
    End Sub

    Maybe with this code. In the attached file you can click the button in cell H2 to run the code. In the example the words and translation are entered in range E1:F50.  The vocabulary to be translated is in column A.

Resources