|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
参与一下。。。
- Sub ykcbf() '//2024.11.10
- Application.ScreenUpdating = False
- With Sheets("SHT")
- r = .Cells(Rows.Count, 7).End(3).Row
- arr = .[a1].Resize(r, 16)
- End With
- With Sheets("Equipment data Master")
- r = .Cells(Rows.Count, 1).End(3).Row
- brr = .[a1].Resize(r, 8)
- For x = 2 To UBound(brr)
- s = brr(x, 2)
- For i = 3 To UBound(arr)
- If InStr(arr(i, 7), s) And arr(i, 15) <> 7204 Then
- brr(x, 7) = arr(i, 15)
- brr(x, 8) = arr(i, 16)
- Exit For
- End If
- Next
- Next
- .[a1].Resize(r, 8) = brr
- End With
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|