Originally Posted by
sfgabriel
I'm working on a xml in excel which has more than 200,000 rows, 4 columns, these rows have text in English and Chinese Simplified together and apart.
what I need is to delete all the rows that have Chinese texts only column C (replacement).
Column D ?
try
Sub test()
Dim a, i As Long, ii As Long, n As Long
With Cells(1).CurrentRegion
a = .Value: .Offset(1).ClearContents
With CreateObject("VBScript.RegExp")
.Global = True
.Pattern = "[\u4E00-\u9FFF]"
For i = 1 To UBound(a, 1)
If Not .test(a(i, 4)) Then
n = n + 1
For ii = 1 To UBound(a, 2)
a(n, ii) = a(i, ii)
Next
End If
Next
End With
.Resize(n, UBound(a, 2)) = a
End With
End Sub
Bookmarks