|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 yynrzwh 于 2023-4-16 13:01 编辑
- Private Sub Worksheet_Change(ByVal t As Range)
- If t.Address = "$B$11" Then
- [G11:H18] = ""
- With Sheets("库存表")
- Set c = .Cells.Find(t.Value, , , 1)
- If Not c Is Nothing Then
- rng = .Range(.Cells(c.Row + 0, 3), .Cells(c.End(4).Row - 1, 3))
- rng1 = .Range(.Cells(c.Row + 0, 6), .Cells(c.End(4).Row - 1, 6))
- [h11].Resize(UBound(rng), 1) = rng
- [g11].Resize(UBound(rng1), 1) = rng1
- End If
-
- End With
- Exit Sub
- End If
-
-
- End Sub
复制代码
|
|