阅: 4089 | 回: 3
等级:高手
- 积分:117
- 财富值:1
- 身份:普通用户
等级:高手
- 积分:117
- 财富值:1
- 身份:普通用户
Sub 按钮1_Click()
Application.ScreenUpdating = False
arr = ActiveSheet.UsedRange
For j = 2 To UBound(arr)
If Len(arr(j, 1)) = 11 Then
Set Rng = Sheets(1).Columns(1).Find(Left(arr(j, 1), 7), lookat:=xlWhole)
If Not Rng Is Nothing Then
arr(j, 2) = Rng.Offset(0, 1)
arr(j, 3) = Rng.Offset(0, 2)
End If
End If
Next j
ActiveSheet.UsedRange = arr
Application.ScreenUpdating = True
End Sub
Application.ScreenUpdating = False
arr = ActiveSheet.UsedRange
For j = 2 To UBound(arr)
If Len(arr(j, 1)) = 11 Then
Set Rng = Sheets(1).Columns(1).Find(Left(arr(j, 1), 7), lookat:=xlWhole)
If Not Rng Is Nothing Then
arr(j, 2) = Rng.Offset(0, 1)
arr(j, 3) = Rng.Offset(0, 2)
End If
End If
Next j
ActiveSheet.UsedRange = arr
Application.ScreenUpdating = True
End Sub
我的个性签名