|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
'估计是这意思,,,
Option Explicit
Dim p, m, f As Boolean
Private Sub Worksheet_Change(ByVal Target As Range)
If f Then Exit Sub
If Not Intersect(Union([Q2:S36], [U2:Y36]), Target) Is Nothing Then m = 0
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address <> "$J$23" Then Exit Sub
If [k8].Value = "单" Then p = 18 Else p = 23
m = m + 1: f = True
Cells(m + 1, p - 1) = m: Cells(m + 1, p) = [j17].Value: Cells(m + 1, p + 1) = [l17].Value
If m = 35 Then m = 0
Target.Offset(, 1).Select
f = False
End Sub |
评分
-
2
查看全部评分
-
|