|
失礼。Replaceメソッドは使い物にならなかったですね^ ^;
なので現在のコードをそのまま配列処理に変更したらどうですか?多少は変わると思いますが。
Dim a As Single, b As Single
Dim ACELL, CCELL, AAA
Dim i3 As Long, i1 As Long
With ActiveCell.Offset(, -3)
ACELL = Range(.Cells, .End(xlDown).Offset(, 1)).Value
End With
With Range(ActiveCell, ActiveCell.End(xlDown))
CCELL = .Value
ReDim AAA(1 To UBound(CCELL), 1 To 1)
a = Timer
For i3 = 1 To UBound(CCELL)
For i1 = 1 To UBound(ACELL)
If CCELL(i3, 1) Like ACELL(i1, 1) Then
AAA(i3, 1) = ACELL(i1, 2)
Exit For
End If
Next i1
Next i3
With .Offset(, 1)
.ClearContents
.Value = AAA
End With
End With
b = Timer
Debug.Print b - a
|
|