|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 jylai 于 2024-2-6 11:53 编辑
1. https://club.excelhome.net/threa ... tml?_dsign=f4f0f44d
2. https://club.excelhome.net/thread-1684463-1-1.html
- <blockquote>Private Sub Worksheet_Change(ByVal Target As Range)
复制代码
- Private Sub Worksheet_Change(ByVal Target As Range)
- With Target
- If .Address = "$C$14" Then
- Application.EnableEvents = False
- If InStr(.Value, "19") > 0 Then
- Me.Cells(21, 3) = "WSC-IP-3/4”* 1”tk"
- Me.Cells(55, 3) = "3/4”"
- ElseIf InStr(.Value, "22") > 0 Then
- Me.Cells(21, 3) = "WSC-IP-7/8''*1''tk"
- Me.Cells(55, 3) = "7/8”"
- End If
- Application.EnableEvents = True
- End If
- End With
- End Sub
- Private Sub Worksheet_Change(ByVal Target As Range)
- If Not Application.Intersect(Target, Range("c17")) Is Nothing Then '
- ReDim brr(1 To 1, 1 To 5)
- s = Mid(Target, Len(Target), 1)
- s = UCase(s)
- If s = "E" Then
- brr(1, 1) = "Copper pipe (expansion valve interface)"
- brr(1, 2) = "WSC-CPS-6*0.8"
- brr(1, 3) = "m"
- brr(1, 4) = "0.3"
- brr(1, 5) = "External balance expansion valve required, internal balance not required"
- Cells(16, 2).Resize(1, 5) = brr
- Cells(17, "f") = "Danfoss TES2#06"
- Range("C16:F16,F17").Interior.ColorIndex = 6
- Else
- Cells(16, 2).Resize(1, 5) = brr
- Cells(17, "f") = "Danfoss TS2#06"
- Range("C16:F16,F17").Interior.ColorIndex = 0
- End If
- End If
- End Sub
复制代码
|
|