- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 37# emma
¸Õ¸Õ¬Ý- Option Explicit
- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim Target_Row As String, s As Integer, dot As Long, k As Integer, m As String
- Dim Ar(), A As Range
- Application.EnableEvents = False '****
- If Target.Address(0, 0) = "E1" Then
- Range("D3").AutoFilter Field:=2, Criteria1:="*" & Target & "*"
- ElseIf Target.Address(0, 0) = "C1" Then
- Range("C3").AutoFilter Field:=1, Criteria1:="*" & Target & "*"
- Else
- Exit Sub '*****
- End If
- With Sheet1
- If Application.Count(.Range("B:B")) > 0 Then
- For Each A In .Range("B:B").SpecialCells(xlCellTypeConstants, 1)
- ReDim Preserve Ar(s)
- If A.Offset(, 8) = "V" And A.Offset(, 9) >= Date And A > A.Offset(, 4) Then dot = Int(A / 1000) * 1000 Else dot = 0
- k = IIf(Sheets("¬d¸ß").[B1] = "Á`©±", 10, 11)
- If A.Offset(, 7) < Date Then
- m = "¤wµ²§ô"
- ElseIf A < A.Offset(, 4) Then
- m = "¹B¶O+¤âÄò¶O"
- ElseIf InStr(A.Offset(, 5), "±À") And A > A.Offset(, 4) Then '¥]§t
- m = "§K¹B"
- ElseIf InStr(A.Offset(, 5), "±À") = 0 And A > A.Offset(, 4) Then '¤£¥]§t
- m = "¹B¶O"
- End If
- Ar(s) = Array(A.Offset(, 2).Value, A.Value, A.Offset(, 3).Value, dot, A.Offset(, 12).Value, A.Offset(, k).Value, m, A.Offset(, 6).Value)
- s = s + 1
- Next
- End If
- End With
- With Sheets("¬d¸ß")
- If s > 0 Then
- Target = ""
- .Range("A" & .Rows.Count).End(xlUp).Offset(1).Resize(s, 8) = Application.Transpose(Application.Transpose(Ar))
- Sheets("¸ê®ÆÀÉ").[C2] = .Range("A" & .Rows.Count).End(xlUp).Offset(, 5) 'FÄæ:Àx¦ì
- End If
- End With
- Application.EnableEvents = True '*******
- End Sub
½Æ»s¥N½X |
|