- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-12-19 12:54 ½s¿è
¦^´_ 43# emma
**** µ{¦¡½X n§l¦¬ ¤~·|¶i¨B ***
Private Sub Worksheet_Change(ByVal Target As Range)
¬O"¸ê®ÆÀÉ"³o¤u§@ªí ªºÀx¦s®æ¦³×§ï«á,·|°õ¦æªºµ{§Ç(¨t²Î¹w³]ªº¤u§@ªí¨Æ¥ó: Target ->¦³×§ï«áªºÀx¦s®æ )- 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
½Æ»s¥N½X ³o¥¨¶° ³]p¬°¦b E1 ©Î¬O C1 ¦³×§ï«á,¤~·|°õ¦æ
§A¦bBÄ榳קï«á µ{¦¡·| Exit Sub (Â÷¶}µ{§Ç :¤£°õ¦æ¤F) ¹F¤£¨ì§Aªº´Á±æ '*****
§An·íBÄæ¼Æ¶q¦³¿é¤Jn¶Ç°e¨ì[¬d¸ß] ¸Ì ¨º·|³y¦¨¸ê®Æµ§¼Æªº¿ù¶Ã ©Ò¥H¤~³]p Exit Sub
¥t¤@¤èªk:
²{¦b ½Ð¤£n¥ÎPrivate Sub Worksheet_Change(ByVal Target As Range) (§R±¼¥¦)
¦A³]¤@«ö¶s «ü©w°õ¦æ¥¨¶°: ¼Æ¶q¬d¸ß
·í§AªºE1 , C1 ©Î¬O BÄæ¼Æ¶q ק粒¦¨«á ½T©w«ö[«ö¶s] ¶Ç°e¨ì[¬d¸ß]- Sub ¼Æ¶q¬d¸ß() '³oµ{§Ç»Ý½Æ»s¨ì [¸ê®ÆÀÉ]ªº¼Ò²Õ¤¤
- Dim Target_Row As String, s As Integer, dot As Long, k As Integer, m As String
- Dim Ar(), A As Range, Rng As Range
- Range("D3").AutoFilter Field:=2, Criteria1:="*" & [C1] & "*"
- Range("C3").AutoFilter Field:=1, Criteria1:="*" & [E1] & "*"
- Set Rng = Sheets("¸ê®ÆÀÉ").Range("B4:B65536").SpecialCells(xlCellTypeVisible) '¦Û°Ê¿z¿ï«á¥i¨£ªºÀx¦s®æ
- If Application.Count(Rng) > 0 Then '¥i¨£ªºÀx¦s®æ:¦³¸ê®ÆÀx¦s®æªºÁ`¼Æ>0
- Set Rng = Rng.SpecialCells(xlCellTypeConstants) '¥i¨£ªºÀx¦s®æ:¦³¸ê®ÆªºÀx¦s®æ
- For Each A In Rng.Cells
- 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
- With Sheets("¬d¸ß")
- If s > 0 Then
- .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
- End Sub
½Æ»s¥N½X |
|