回復 23#蒼雪
請參考。
Sub test()
arr = Array("L20", "L10", "L30")
Application.ScreenUpdating = False
er = [C65536].End(3).Row
For r = 2 To er
L = Application.Match(Split(Cells(r, 3).Value, "[")(0), arr, 0)
N = Format(Split(Split(Cells(r, 3).Value, "/")(0), "[")(1), "00.0")
E = Left(Split(Split(Cells(r, 3).Value, "/")(1), "]")(0), 1)
If L = 1 And N >= 7 And N <= 16 And Asc(E) >= 65 And Asc(E) <= 70 Then
Cells(r, 5).Value = L & N & E
End If
Next r
Range("E2:E" & er).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("A2:E" & er).Sort Key1:=[E2]
Columns("E").ClearContents
Application.ScreenUpdating = True
End Sub作者: 蒼雪 時間: 2018-2-24 21:34