Board logo

¼ÐÃD: [µo°Ý] ½Ð±Ð§ï¨}³t«×¤èªk [¥´¦L¥»­¶]

§@ªÌ: 198188    ®É¶¡: 2012-11-23 20:57     ¼ÐÃD: ½ÐÀ°¦£¸Ñ¨M¿ù»~¡C

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-11-24 15:35 ½s¿è

[attach]13260[/attach]

Private Sub Worksheet_Change(ByVal Target As Range)
Dim A As Range, Rng As Range
If Target.Column = 1 Then
With Sheets("oracle")
For i = 1 To .UsedRange.Rows.Count
   Set A = .UsedRange.Rows(i).Find(Target)
   If Not A Is Nothing Then
     If Rng Is Nothing Then
     Set Rng = .UsedRange.Rows(i)
     Else
     Set Rng = Union(Rng, .UsedRange.Rows(i))
     End If
    End If
Next
End With
End If
If Not Rng Is Nothing Then Rng.Copy Target.Offset(, 1)

End Sub
½Ð°Ý­þ¸Ì¥X¿ù¤F¡A«e¤@¤d­Ó¥ª¥k³£§ä¹ï¤F¡A¦ý¤§«áªº¸ê®Æ´N¶}©l¶Ã¤F¡C
¥t¥~½Ð°Ý
1)¦p¦ó±N´M§ä½d³ò³W©w¬Y¤@­ÓÄæ¡A¤£¬O¥þ³¡³£¦b´M§ä½d³ò¡C
2)If Target.Column = 1 Then ¥i§_§ï¦¨«ü©w¬Y­Ó¦r¶Ü¡H¨Ò¦p¡GTarget = "TT"
3)¥i§_³]©w´X­Ó´M§äªº³W«h¶Ü¡H¨Ò¦p¡GClient = "John"  Payment term = ¡§TT¡¨   ORIGIN = "USA"
4)¥i§_±NTarget«ü©w¬Y¤@­ÓÀx¦s®æ¡H
5)¥i§_¥u¬Ocopy ²Å¦X³W®æªº¬Y´X­ÓÄ檺¸ê®Æ¶Ü¡H¤£¬O¥þ³¡¸ê®Æ³£copy ¹L¥h¡C¨Ò¦p A Äæ¡ACÄæ¡AEÄæ¡A¨ä¥Lªº³£¤£­n¡C
§@ªÌ: 198188    ®É¶¡: 2012-11-25 21:41

¦^´_ 1# 198188


    ½Ð°Ý¦³µL°ª¤H¥i¥HÀ°¦£¸Ñµª¡H
§@ªÌ: GBKEE    ®É¶¡: 2012-11-26 15:22

¦^´_ 2# 198188
§A¦C¥Xªºµ{§Ç,¦ý¨S»¡©ú¥Øªº®ÄªG,¬O¨S¤H©úÁA§A­n½Ð±Ð¤°»ò.
¨Ò¦p¡GClient = "John"  Payment term = ¡§TT¡¨   ORIGIN = "USA"  ³o¤]¬Ý¤£À´§A­n½Ð±Ð¤°»ò.
§@ªÌ: mark15jill    ®É¶¡: 2012-11-26 16:19

¦^´_ 3# GBKEE


    If Target.Column = 1 Then   ³o­Ó¦n¹³¬O ·j´M½d³ò  ¥L­n±N Target §ï¦¨  "TT"  ¡A¥u¬O ¬Ý¤F¬Ý¡A·Pı¤£¶¶.....
§@ªÌ: 198188    ®É¶¡: 2012-11-30 14:08

¦^´_ 3# GBKEE
Private Sub Worksheet_Change(ByVal Target As Range)
Dim A As Range, Rng As Range
If Target.Column = 1 Then
With Sheets("oracle")
For i = 1 To .UsedRange.Rows.Count
    Set A = .UsedRange.Rows(i).Find(Target)
    If Not A Is Nothing Then
      If Rng Is Nothing Then
      Set Rng = .UsedRange.Rows(i)
      Else
      Set Rng = Union(Rng, .UsedRange.Rows(i))
      End If
     End If
Next
End With
End If
If Not Rng Is Nothing Then Rng.Copy Target.Offset(, 1)

End Sub
¸ê®Æ®w
  A               B                   C                D                 E                F                  G
    ©m¦W        ©Ê§O        ¹q¸Ü        °êÂÇ        ¨®µP        ¦~ÄÖ        ¾·~
John        ¨k        11111111        China        ¦³        25        Clerk
Peter        ¨k        22222222        Germany        ¦³        30        A/C
David        ¨k        33333333        USA        µL        15        Admin
Tina        ¤k        44444444        China        ¦³        25        Clerk
June        ¤k        55555555        Italy        µL        35        Clerk

·Q­n®ÄªG¡G
1)¦p¦ó±N´M§ä½d³ò³W©w¬Y¤@­ÓÄæ¡A¤£¬O¥þ³¡³£¦b´M§ä½d³ò¡C
´N¬O·Q¦b©m¦W¡]A¡^¤@Äæ³]©w¬°´M§ä½d³ò
¨Ò¦p¡G³W«h¡G·Q§ä§t¦³"a"ªº¸ê®Æ
µ²ªG:
Tina        ¤k        44444444        China        ¦³        25        Clerk

2)If Target.Column = 1 Then ¥i§_§ï¦¨«ü©w¬Y­Ó¦r¶Ü¡H¨Ò¦p¡GTarget = "TT"
¦p¦ó³]©w±NTarget¤£¬OColumn ¦Ó¬O«ü©w¤@­Ó¦r¡C
³W«h¡GTarget§t¦³¡§in¡¨¤l¸ê®Æ
µ²ªG¡G
John        ¨k        11111111        China        ¦³        25        Clerk
David        ¨k        33333333        USA        µL        15        Admin
Tina        ¤k        44444444        China        ¦³        25        Clerk

3)¥i§_³]©w´X­Ó´M§äªº³W«h¶Ü¡H¨Ò¦p¡GClient = "John"  Payment term = ¡§TT¡¨   ORIGIN = "USA"
³W«h¡G©Ê§O=¡§¨k¡¨; ¨®µP=¡§¦³¡¨
µ²ªG¡G
John        ¨k        11111111        China        ¦³        25        Clerk
Peter        ¨k        22222222        Germany        ¦³        30        A/C
³W«h¡G°êÂÇ=¡§China"; ¨®µP=¡§¦³¡¨;¦~ÄÖ="25"; ¾·~="Clerk"
µ²ªG¡G
John        ¨k        11111111        China        ¦³        25        Clerk
Tina        ¤k        44444444        China        ¦³        25        Clerk

4)¥i§_±NTarget«ü©w¬Y¤@­ÓÀx¦s®æ¡H
¨Ò¦p±NTarget«ü©w¬O¥t¤@­ÓªíªºÀx¦s®æ"A1"
¥u­nA1¿é¤J"¨k", Target´N¬O"¨k"
µ²ªG¡G
John        ¨k        11111111        China        ¦³        25        Clerk
Peter        ¨k        22222222        Germany        ¦³        30        A/C
David        ¨k        33333333        USA        µL        15        Admin

©ÎªÌ±NTarget«ü©w¬O¥t¤@­ÓªíªºÀx¦s®æ"A1" ¤Î "A2"
¥u­nA1¿é¤J"¨k", A2¿é¤J"¦³¡§ ¡FTarget´N¬O"¨k" ©M "¦³¡¨
µ²ªG¡G
John        ¨k        11111111        China        ¦³        25        Clerk
Peter        ¨k        22222222        Germany        ¦³        30        A/C

5)¥i§_¥u¬Ocopy ²Å¦X³W®æªº¬Y´X­ÓÄ檺¸ê®Æ¶Ü¡H¤£¬O¥þ³¡¸ê®Æ³£copy ¹L¥h¡C¨Ò¦p A Äæ¡ACÄæ¡AEÄæ¡A¨ä¥Lªº³£¤£­n¡C
³]©w¥u·|copy A Äæ¡ABÄæ¡ACÄæ
³W«hTarget="¦³"
µ²ªG¡G
John        ¨k        11111111
Peter        ¨k        22222222
Tina        ¤k        44444444
§@ªÌ: GBKEE    ®É¶¡: 2012-12-1 10:59

¦^´_ 5# 198188


   [attach]13352[/attach]

©m¦W-¾·~Äæ ¦r§À¥[*¥i·j¬d§t¦¹¦r¦êªº¸ê®Æ
¦p¹Ï Sheet2 ªºµ{¦¡½X
  1. Option Explicit
  2. Private Sub Worksheet_Change(ByVal Target As Range)         '³o¬O¤u§@ªíªºÄ²µo¨Æ¥ó
  3.     Dim xlFind As Range, F As String, W As String
  4.     Application.EnableEvents = False                        'EnableEvents ÄÝ©Ê ¦pªG«ü©wª«¥ó¯àIJµo¨Æ¥ó¡A«h¥»Äݩʬ° True¡CŪ/¼g Boolean¡C
  5.     If Target.Row = 2 Then                                  '§ïÅÜ¿é¤J(¸ê®Æ)ªºÀx¦s®æ¦C¦ì=2
  6.         If Target.Column >= 1 And Target.Column <= 7 Then   '§ïÅÜ¿é¤J(¸ê®Æ)ªºÀx¦s®æÄæ¦ì¤¶©ó AÄæ:GÄæ ¶¡
  7.         'If Target.Row = 2 And Target.Column >= 1 And Target.Column <= 7 Then  '¨â§PÂ_¦¡ ¥i¦X¨Ö
  8.             Cells(Rows.Count, "A").End(xlUp).CurrentRegion.Offset(1) = ""   '²M°£Â¦³´M§äªº¸ê®Æ
  9.             W = Replace(Target, "*", "")                                    '¥h±¼ "*"¦r¦ê
  10.             Set xlFind = Sheets("¸ê®Æ®w").Columns(Target.Column).Find(W, LOOKAT:=IIf(InStr(Target, "*"), xlPart, xlWhole))
  11.                       '¦bSheets("¸ê®Æ®w").Columns(Target.Column) ªº¬Û¦PÄæ¦ì¤¤Target¦³"*"  ´M§ä¦³xlPart(³¡¥÷)¬Û¦P
  12.             If Not xlFind Is Nothing Then           '´M§ä¨ì
  13.                 F = xlFind.Address                  '³]¤U²Ä¤@­Ó§ä¨ìªº¦ì¸m
  14.                 Do
  15.                     With Cells(Rows.Count, "A").End(xlUp).Offset(1)
  16.                         Cells(.Row, "A") = xlFind.Parent.Cells(xlFind.Row, "A")  'xlFind.Parent: Parent ª«¥óªº¤÷¼h
  17.                         Cells(.Row, "B") = xlFind.Parent.Cells(xlFind.Row, "B")  'xlFind.Row:    §ä¨ìªº¦C¸¹
  18.                         Cells(.Row, "C") = xlFind.Parent.Cells(xlFind.Row, "C")
  19.                         ' Cells(.Row, "C") «e­±¨S¥[  . ¬O¦b³oSheet ªº Cells(Àx¦s®æ)
  20.                     End With
  21.                     Set xlFind = Sheets("¸ê®Æ®w").Columns(Target.Column).FindNext(xlFind) '±µµÛ©¹¤U§ä
  22.                 Loop While F <> xlFind.Address      'Â÷¶}°j°é: ª½¨ì´M§ä¦^²Ä¤@­Ó§ä¨ìªº¦ì¸m
  23.             End If
  24.          End If
  25.     End If
  26.     Application.EnableEvents = True
  27. End Sub
½Æ»s¥N½X

§@ªÌ: 198188    ®É¶¡: 2012-12-1 12:50

¦^´_ 6# GBKEE

[attach]13356[/attach]

¬O¥i¥H´M§ä¥X¨Ó¡A¦ý¬O­n¦b²Ä¤GÄæ¿é¤J¤~·|¥X¨Ó¡A¦pªG²Ä¤GÄæ§Ú¥Îªº¤£¬O©m¦W´M§ä¡A¨º»ò´N·|¦³­«½Æ
John         ¨k        11111111        a*
John         ¨k        11111111       
Peter        ¨k        22222222       
David        ¨k        33333333       
Tina        ¤k        44444444       
June        ¤k        55555555       
¥t¥~§Ú¥Î¨â­Ó¨Ó´M§ä¡A¥X¨Óªº¬O³Ì«á¿é¤Jªº­þ­Ó³W®æªº¸ê®Æ¡A¦ý§Ú·Q­nªº¬O­n¥þ³¡²Å¦X¤~·|¥X¨Ó¡C¥t¥~²Ä¤GÄæ¥X²{¤@¦¸«á´N»Ý­n¦Û¤v§R°£¡]John ¨k 11111111¡^
John         ¨k        11111111        usa*                        clerk*
David        ¨k        33333333                               
                       
½Ð°Ý¥i§_¦bsheet3 °µ±ø¥ó¥Î³~
A1 ¬O¶ñ¼Æ¦r¡A¼g©ú·|¦³¦h¤Ö­Ó³W«h,
A2ªí¥Ü³o±ø³W«hÀ³¥Î¦b­þ¤@Äæ B2¥Nªí­n´M§äªº¸ê®Æ
¨Ò¦p
A1 ¶ñ "1"
A2 ¶ñ "B"; B2 ¶ñ "¨k"
¥X¨Óªº¬O
John         ¨k        11111111
Peter        ¨k        22222222
David        ¨k        33333333

¨Ò¦p
A1 ¶ñ "3"
A2 ¶ñ "D"; B2 ¶ñ "A"
A3 ¶ñ "E"; B2 ¶ñ "¦³"
A4 ¶ñ "F"; B2 ¶ñ "CLERK"
¥X¨Óªº¬O
John         ¨k        11111111       
Tina        ¤k        44444444       

¨Ò¦p
A1 ¶ñ "2"
A2 ¶ñ "D"; B2 ¶ñ "A"
A3 ¶ñ "E"; B2 ¶ñ "µL"
¥X¨Óªº¬O
David        ¨k        33333333
§@ªÌ: 198188    ®É¶¡: 2012-12-1 20:16

¦^´_ 7# 198188


½Ð°Ý°ª¤H©ú¥Õ§Ú·Qªí¥Ü¤°»ò¶Ü¡H»Ý­n§ó¥[¸Ô²Óªí©ú¶Ü¡H
§@ªÌ: stillfish00    ®É¶¡: 2012-12-2 11:20

¦^´_ 7# 198188
§AÀ³¸Óª`·N¤@¤UGª©ªºÁY¹Ï ,
¥L³o¼Ë°µ¤w¸g±N±ø¥ó°Ï©M¿z¿ïµ²ªG¤À¶}¤F,
§Aªºsheet2¤@¶}©l¬O§¹¥þªÅ¥Õ
§@ªÌ: 198188    ®É¶¡: 2012-12-2 11:39

¦^´_ 9# stillfish00


³oÂI§Úª¾¹D¡A¤£±Ä¥ÎOption Explicit´N¥i¥H¤F¡C¥i¥H¥Î«ö¶s©ÎªÌ¤â°Ê±±¨î¡C³Ì¥D­n¬O¥i¥H°µ¨ì¨º¨Ç¥\¯à¡C
§@ªÌ: stillfish00    ®É¶¡: 2012-12-2 14:49

¦^´_ 10# 198188
°Ñ¦Ò¬Ý¬Ý , §Q¥Î¶i¶¥¿z¿ï°µªº
[attach]13371[/attach]
[attach]13372[/attach]
  1. Sub myFilter()
  2.     Dim rngSrc As Range, rngCopyField As Range, rngFilter As Range
  3.     Dim nextRow As Long, endRow As Long
  4.    
  5.     Set rngSrc = Sheets("¸ê®Æ®w").[A1:G7]
  6.     Set rngCopyField = Sheets("±ø¥ó°Ï").[B8:H8]
  7.     Set rngFilter = Sheets("±ø¥ó°Ï").[B1].Resize(Sheets("±ø¥ó°Ï").[B1].CurrentRegion.Rows.Count, 8)
  8.    
  9.     nextRow = Sheets("¾ã²z°Ï").UsedRange.Rows.Count + 1
  10.                
  11.     rngSrc.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _
  12.     rngFilter, CopyToRange:=Sheets("¾ã²z°Ï").Range("A" & nextRow)
  13.         
  14.     endRow = Sheets("¾ã²z°Ï").UsedRange.Rows.Count
  15.    
  16.     For i = 1 To rngCopyField.Count
  17.         If rngCopyField(i) = "N" Then
  18.             Sheets("¾ã²z°Ï").Range(nextRow & ":" & endRow).Columns(i).Clear
  19.         End If
  20.     Next
  21.    
  22.     Sheets("¾ã²z°Ï").Range("A" & nextRow).Resize(1, 7).Delete Shift:=xlUp   'delete header
  23.    
  24.     Set rngSrc = Nothing
  25.     Set rngCopyField = Nothing
  26.     Set rngFilter = Nothing
  27. End Sub
½Æ»s¥N½X

§@ªÌ: 198188    ®É¶¡: 2012-12-3 09:33

¦^´_ 11# stillfish00

½Ð°Ý¦pªG´M§ä±ø¥ó¬OªÅ®æ¡AÀ³¸Ó¦p¦óªí¥Ü¡H
§@ªÌ: stillfish00    ®É¶¡: 2012-12-3 11:31

¦^´_ 12# 198188
±ø¥ó³]©w³£¸ò¶i¶¥¿z¿ï·Ç«h¤@¼Ë
§A¥i¥H°Ñ¦Ò  http://office.microsoft.com/zh-tw/excel-help/HP010073942.aspx
¦p¿é¤J
=" "        ¿z¿ï¸ÓÄæ¦ì¬°³æ­ÓªÅ¥Õ¦r¤¸
="* *"    ¿z¿ï¸ÓÄæ¦ì¥]§tªÅ¥Õ¦r¤¸
=" *"      ¿z¿ï¸ÓÄæ¦ì¥HªÅ¥Õ¦r¤¸¶}ÀY
§@ªÌ: 198188    ®É¶¡: 2012-12-3 11:56

¥»©«³Ì«á¥Ñ 198188 ©ó 2012-12-3 11:58 ½s¿è

¦^´_ 13# stillfish00


    ©m¦W         ©Ê§O         ¹q¸Ü         °êÂÇ         ¨®µP         ¦~ÄÖ         Â¾·~
John         ¨k        11111111        China        ¦³                Clerk
Peter        ¨k        22222222        Germany        ¦³        30        A/C
David        ¨k        33333333        USA        µL        15        ADMIN
Tina        ¤k        44444444        China        ¦³        25        Clerk
June        ¤k        55555555        ITALY        µL        35        Clerk


¶i¶¥¿z¿ï·Ç«h:        ©m¦W         ©Ê§O         ¹q¸Ü         °êÂÇ         ¨®µP         ¦~ÄÖ         Â¾·~
                                       *n*                                                                       =" "
½Æ»sÄæ¦ì:                             Y        Y        Y        N        Y        N        Y

¨S¦³¤ÏÀ³¡A¨S¦³¸ê®Æ¥X¨Ó
§@ªÌ: stillfish00    ®É¶¡: 2012-12-3 12:16

¦^´_ 14# 198188
§äªÅ¥ÕÀx¦s®æ , ¿é¤J
=   ©Î   ="="
§@ªÌ: 198188    ®É¶¡: 2012-12-3 12:47

¦^´_ 15# stillfish00


    ¥t¤@­Ó°ÝÃD¡A½Ð°Ý¦pªG­n´M§äµ´¹ï­È©O¡AÀ³¸Ó¦p¦ó¼g¡H
¨Ò¦p¡G
KEN
KENNY
KEN CHEN
CHAN KEN

¦pªG¥u­nÅã¥Ükenªº¸ê®Æ¡A¨º»òÀ³¸Ó«ç¼Ë¼g¡H
§@ªÌ: 198188    ®É¶¡: 2012-12-3 13:00

¦^´_ 15# stillfish00


    [attach]13377[/attach]
¦n¹³¦³¨Ç°ÝÃD¡AµLªk°µ¨ì
§@ªÌ: stillfish00    ®É¶¡: 2012-12-3 13:59

¦^´_ 17# 198188

="=KEN"

[attach]13378[/attach]
1.  §AÄæ¼Æ¦@¦³38Äæ resize¤]­n¸òµÛ§ï
2.  Result¤u§@ªí­n²MªÅ­Èªº®É­Ô , ­n¥Î¾ã¦C§R°£ ,
     §_«h§PÂ_Sheets("Result").UsedRange.Rows.Count¦C¼Æ®É
     ÁÙ·|¬O²MªÅ«eªº¦C¼Æ , ³oÂI§Ú¤]¤£ª¾¹D¦ó¸Ñ...
§@ªÌ: 198188    ®É¶¡: 2012-12-3 15:27

¥»©«³Ì«á¥Ñ 198188 ©ó 2012-12-3 15:29 ½s¿è

¦^´_ 18# stillfish00

½Ð°Ý¬°¤°»ò«ö¤@¦¸«á¡A¥¦¦Û°Ê±N³Ì«á¨ºrow·í¦¨¤U¦¸ªº²Ä¤@­Ó¡H
¦]¬°§Ú«ö¤@¦¸«á¡A§â¸ê®Æ§R°£«á´N¦b¤W¤@¦¸°õ¦æªº³Ì«á¤@¦C+1¶}©l¡A¥i¥HÅý¥¦¤£·|¦Û°Ê°O¾Ð¡A¨C«ö¤@¦¸´N¥ý§R°£¥H«eªº¸ê®Æ¡AµM«á³£±qA2¶}©l¡C
¥t¥~§Úªþ¥ó¤º¥t¤@­Óµ{¦¡°õ¦æ®É«ÜºC¡A¦³¥[§Öªº¤èªk¶Ü
§@ªÌ: mark15jill    ®É¶¡: 2012-12-3 15:32

¦^´_ 10# 198188


    ¥ªÃ䨺±iÁY¹Ï¦³»¡©ú...
§@ªÌ: stillfish00    ®É¶¡: 2012-12-3 19:15

¦^´_ 19# 198188
¥i¥H¦Û¤v§ïªü , §Ú¬O¥H¬°§A­n¤@ª½·s¼W¤~³o¼Ë¼gªº..
    'nextRow = Sheets("Result").UsedRange.Rows.Count + 1
    nextRow = 2
    Sheets("Result").UsedRange.Offset(1).Clear
    ---²¤---
    'endRow = Sheets("Result").UsedRange.Rows.Count
    endRow = Sheets("Result").Range("A" & Sheets("Result").Rows.Count).End(xlUp)
§@ªÌ: 198188    ®É¶¡: 2012-12-3 23:03     ¼ÐÃD: ½Ð±Ð§ï¨}³t«×¤èªk

Sub Worksheet()
Dim LastRec As Integer
Dim i As Integer

Worksheets("Oracle").Range("G1").Select
ActiveCell.End(xlDown).Select
     LastRec = ActiveCell.Row
     
For i = 2 To LastRec
Worksheets("Oracle").Range("A" & i).Value = Worksheets("Oracle").Range("G" & i).Value '±NGÄ檺­ÈCOPY¨ìAÄæ

If IsError(Application.VLookup(Worksheets("Oracle").Range("C" & i).Value, Sheets("Follower").Range("A:E"), 5, False)) Then
Worksheets("Oracle").Range("B" & i).Value = ""  °²¦pSHEET ORACLE CÄ檺­È¦bSHEET FOLOWER A¡GEÄæ§ä¤£¨ì¡A´N±NBÄæ³]©wªÅ®æ
Else
Worksheets("Oracle").Range("B" & i).Value = Application.VLookup(Worksheets("Oracle").Range("c" & i).Value, Sheets("Follower").Range("A:E"), 5, False) §_«h±NSHEET ORACLE CÄæ¦bSHEET FOLLOWER´M§ä¬Û¦P¡A¨Ã±N¬Û¦PªºEÄæ­È©ñ¦bSHEET ORACLE BÄæ
End If

Next i
i = i + 1

End Sub

¹B¦æ¤j¬ù7000ROW,¦ý¹B¦æ±o«ÜºC¡A½Ð°Ý¦U¦ì¤j¤j¡A¦³¨S¦³¥i¥H¥[§Ö¹B¦æªº¤èªk¡H
§@ªÌ: GBKEE    ®É¶¡: 2012-12-4 09:17

¦^´_ 22# 198188
´ú¸Õ§¹¦¨¬ù12¬í,®É¶¡¤£ºâªø§a!
  1. Option Explicit
  2. Sub Worksheet()
  3.     Dim LastRec As Integer
  4.     Dim i As Integer, T
  5.     T = Time
  6.     With Worksheets("Oracle")
  7.          LastRec = .Range("G1").End(xlDown).Row
  8.         .Range("A2:A" & LastRec).Value = .Range("G2:G" & LastRec).Value  '¥þ³¡ª½±µµ¹­È·|§Ö¨Ç
  9.         For i = 2 To LastRec
  10.             If IsError(Application.VLookup(Worksheets("Oracle").Range("C" & i).Value, Sheets("Follower").Range("A:E"), 5, False)) Then
  11.                 .Range("B" & i).Value = ""
  12.             Else
  13.                 .Range("B" & i).Value = Application.VLookup(Worksheets("Oracle").Range("c" & i).Value, Sheets("Follower").Range("A:E"), 5, False)
  14.             End If
  15.         Next
  16.     End With
  17.     MsgBox Format(Time - T, "HH:MM:SS")
  18. End Sub
½Æ»s¥N½X

§@ªÌ: 198188    ®É¶¡: 2012-12-4 09:30

¦^´_ 23# GBKEE

12¬í°÷§Ö¤F¡AÁÂÁÂ~
¥t¥~½Ð°Ý¦pªG¥ÎOption Explicit¡A§Ú±N¸ê®Æ±q¥t¥~¤@­Óexcel copy¹L¨Ó¡A¥¦·|¦Û°Êrun¶Ü¡HÁÙ¬O»Ý­n¥t¥~«ö¶s¤~¯àrun?
§@ªÌ: GBKEE    ®É¶¡: 2012-12-4 09:53

¦^´_ 24# 198188
Option Explicit ³¯­z¦¡ ¦b¼Ò²Õ¼h¦¸¤¤±j­¢¨C­Ó¦b¼Ò²ÕùتºÅܼƳ£¥²¶·©ú½Tªº«Å§i¡C
¼Ò²Õ¼h¦³Option Explicit§@¥Î¬O:  ¨t²Î·|´£¿ô,¨S«Å§iªºÅܼƶ·«Å§i. ­n¾i¦¨³o²ßºD ¦³§Uµ{¦¡ªº°»¿ù.
§@ªÌ: 198188    ®É¶¡: 2012-12-4 10:41

¦^´_ 25# GBKEE


    ·PÁ¸ÑÄÀ~
½Ð°Ý¦pªG­ncopy¹L¥h«á¡A¤£«ö¶s´N¦Û°Êrun ¥i¥H¶Ü¡H
§@ªÌ: GBKEE    ®É¶¡: 2012-12-4 11:20

¦^´_ 26# 198188
§A­n¦b¦óºØª¬ºA¤U¤£«ö¶s´N¦Û°Êrun
1.Àɮ׶}±Ò®É
A: ¦bThisWorkbook³o¼Ò²Õ¤¤¦³¤@¹w³]ªºµ{§Ç
  1. Private Sub Workbook_Open()
  2.    '³o¸Ìªºµ{¦¡½X¤£«ö¶s´N¦Û°Êrun
  3. End Sub
½Æ»s¥N½X
B: ¦bVBA ªº¤@¯ë¼Ò²Õ ¼g¤W
  1. Sub AUTO_OPEN()  
  2. '³o¸Ìªºµ{¦¡½X¤£«ö¶s´N¦Û°Êrun
  3. End Sub
½Æ»s¥N½X
2.Àɮ׶}±Ò«á¿ï©w(²¾°Ê)¨ì³o¤u§@ªí,¦b³o¤u§@ªí¼Ò²Õ¤¤¦³¤@¹w³]ªºµ{§Ç
  1. Private Sub Worksheet_Activate()
  2.    '³o¸Ìªºµ{¦¡½X¤£«ö¶s´N¦Û°Êrun
  3. End Sub
½Æ»s¥N½X
3.¨Ï¥Î OnTime ¤èªk
  1. Sub AUTO_OPEN()  
  2. Application.OnTime Now + TimeValue("00:05:00"), "¼Ò²Õ.µ{¦¡¦WºÙ"
  3. End Sub
½Æ»s¥N½X

§@ªÌ: 198188    ®É¶¡: 2012-12-4 11:28

´N¬O·í¸Ó¸ê®Æ®wªº¸ê®Æ¦³ÅܰʬOrun
§@ªÌ: 198188    ®É¶¡: 2012-12-5 17:25

¦^´_ 27# GBKEE


   ¦b18ªºµo¨¥
½Ð°ÝÅã¥Ü¤µ¤é©Î¤§«áªº¤é´Á¡AÀ³¸Ó¦p¦ó¶ñ¡H
>=today()   ?
>=5/12/2012 ?
§@ªÌ: GBKEE    ®É¶¡: 2012-12-5 18:02

¦^´_ 29# 198188
18# ªþÀÉ [Rule] ¤u§@ªí  Ordered Date Äæ¦ìªº¶i¶¥¿z¿ï¤½¦¡
=">="&DATEVALUE("2012/10/1")    «ü©w¤é´Á
=">="&TODAY()                                    ·í¤é
§@ªÌ: 198188    ®É¶¡: 2012-12-5 18:09

¦^´_ 30# GBKEE


    ¥i§_³]©w·í¤éªº«e´X¤Ñ¡H
TODAY()-7 ?
§@ªÌ: GBKEE    ®É¶¡: 2012-12-5 18:11

¦^´_ 31# 198188
¥i¦Û¦æ¸Õ¤@¤U°Ú!!!
§@ªÌ: 198188    ®É¶¡: 2012-12-5 23:10

¦^´_ 32# GBKEE


    ¥i¥H¡C
¨º»ò¦pªG¬O·Q¥Î¤ë¥÷©O¡H¦³¨S¦³¤@­Ó¬O=·í¤ë¥÷¡H
§@ªÌ: GBKEE    ®É¶¡: 2012-12-6 10:25

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-12-6 10:29 ½s¿è

¦^´_ 33# 198188
½Ð¬Ý¹Ï¸Ñ

[attach]13402[/attach]
§@ªÌ: 198188    ®É¶¡: 2012-12-12 14:01

¦^´_ 34# GBKEE


    ½Ð°Ý¦pªG­nset ¤@­Órule
¤£¥]§tcancel³o­Ó¦rÀ³¸Ó¦p¦óªí¹F

¥H¤Î

¤£¥]§tcancel³o­Ó¦r©ÎªÌ¤£¥]§tresell ³o­Ó¦rÀ³¸Ó¦p¦óªí¹F
§@ªÌ: GBKEE    ®É¶¡: 2012-12-13 07:53

¦^´_ 35# 198188


  [attach]13509[/attach]
§@ªÌ: 198188    ®É¶¡: 2012-12-13 08:51

¦^´_ 36# GBKEE

½Ð°Ý¤U­±³o¥y­þ¸Ì¥X¿ù¤F¡H °õ¦æ¶¥¬q¿ù»~¡¥9¡¦¡G°}¦C¯Á¤Þ¶W¥X½d³ò
If IsError(Application.VLookup(Wb.Worksheets("New form of payment report").Range("B" & j).Value, Worksheets("outstanding payments").Range("A:A"), 1, False)) Then

link:
    http://forum.twbts.com/viewthrea ... amp;page=3#pid48236
§@ªÌ: GBKEE    ®É¶¡: 2012-12-13 10:21

¦^´_ 37# 198188
" °õ¦æ¶¥¬q¿ù»~¡¥9¡¦¡G°}¦C¯Á¤Þ¶W¥X½d³ò"-> ´N¬O§ä¤£¨ì!!! (³o¨â¤u§@ªí¦WºÙÀˬd¬Ý¬Ý)  
VLookup(Wb.Worksheets("New form of payment report").Range("B" & j).Value, Worksheets("outstanding payments").Range("A:A"), 1, False)
§@ªÌ: 198188    ®É¶¡: 2012-12-13 14:19

¦^´_ 38# GBKEE

[attach]13513[/attach]
    ¥t¥~½Ð°Ý¥i§_¦bexcel ªºEDIT FORMATING RULE³]©w
¦bAÄæ³]©w¦pªGBÄæ¬O­È¤j¹L0 ©M¤£µ¥©óAÄæ´NÅÜÃC¦â
§@ªÌ: 198188    ®É¶¡: 2012-12-13 14:24

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-12-13 14:45 ½s¿è

¦^´_ 38# GBKEE
  1. Option Explicit
  2. Sub ex()
  3.     Dim FRng As Range, Wb As Workbook
  4.     Dim A As Range, Rng As Range
  5.     Dim fs As String, xi As Integer
  6.     Dim i As Integer
  7.     Dim j As Integer
  8.     Dim k As Integer
  9.     i = Worksheets("outstanding payments").Range("A" & Worksheets("outstanding payments").Rows.Count).End(xlUp).Row
  10.     fs = "C:\Documents and Settings\USER\®à­±\payment report 2012.xlsx"
  11.     Set Wb = Workbooks.Open(fs)
  12.     With Worksheets("New form of payment report")
  13.       j = Worksheets("New form of payment report").Range("E" & Worksheets("New form of payment report").Rows.Count).End(xlUp).Row
  14.     End With
  15.    Do
  16.     If Wb.Worksheets("New form of payment report").Range("k" & j).Value = Date And Wb.Worksheets("New form of payment report").Range("h" & j).Value >= 0.95 Then   
  17.     If IsError(Application.VLookup(Wb.Worksheets("New form of payment report").Range("B" & j).Value, Worksheets("outstanding payments").Range("A:A"), 1, False)) Then   
  18.     Worksheets("outstanding payments").Range("A" & i + 1) = Wb.Worksheets("New form of payment report").Range("B" & j).Value
  19.     Worksheets("outstanding payments").Range("F" & i + 1) = Wb.Worksheets("New form of payment report").Range("H" & j).Value
  20.     End If
  21.      j = j - 1
  22.      i = i + 1
  23.     End If
  24.     Loop While j = 1   
  25.    Wb.Close 0
  26. End Sub
½Æ»s¥N½X
¨º»ò¬O¤£¬O­n¦bworksheets«e­±¥[¤Wworkbooks?¦ý¬O¤W¤@¥y¦WºÙ¨S¦³°ÝÃD¡H
§@ªÌ: GBKEE    ®É¶¡: 2012-12-13 14:53

¦^´_ 40# 198188
¨º»ò¬O¤£¬O­n¦bworksheets«e­±¥[¤Wworkbooks?¦ý¬O¤W¤@¥y¦WºÙ¨S¦³°ÝÃD¡H
¤u§@ªí¦WºÙµL»~!!  µ{¦¡½X: µ{§Ç©Ò¦bªº¬¡­¶Ã¯¤§¤u§@ªí, ¤£»Ý¥[¤W  workbooks  ¨ä¥L¬¡­¶Ã¯ªº¤u§@ªí­n¥[workbooks
Àx¦s®æ­n³]©³¦â,¥Î¿ý»s·s¥¨¶°¥i±oµ{¦¡½X
§@ªÌ: 198188    ®É¶¡: 2012-12-14 14:11

¦^´_ 38# GBKEE

²Ä38¶K
  ½Ð°Ý¥i§_¦bexcel ªºEDIT FORMATING RULE³]©w
¦bAÄæ³]©w¡G¦pªGBÄæ¬O­È¤j¹L0 ©M¤£µ¥©óAÄæ´NÅÜÃC
§@ªÌ: 198188    ®É¶¡: 2012-12-14 14:42

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-12-14 14:57 ½s¿è

¦^´_ 41# GBKEE
  1. Option Explicit
  2. Sub ex()
  3.     Dim FRng As Range, Wb As Workbook
  4.     Dim A As Range, Rng As Range
  5.     Dim fs As String, xi As Integer
  6.     Dim i As Integer
  7.     Dim j As Integer
  8.     Dim k As Integer
  9.     i = Worksheets("outstanding payments").Range("A" & Worksheets("outstanding payments").Rows.Count).End(xlUp).Row
  10.     fs = "C:\Users\patrick.HKG\Desktop\payment report 2012.xlsx"
  11.     Set Wb = Workbooks.Open(fs)   
  12.     With Worksheets("New form of payment report")
  13.       j = Worksheets("New form of payment report").Range("E" & Worksheets("New form of payment report").Rows.Count).End(xlUp).Row   
  14.     End With   
  15.     Do   
  16.     ThisWorkbook.Activate   
  17.     If Wb.Worksheets("New form of payment report").Range("k" & j).Value = Date And Wb.Worksheets("New form of payment report").Range("h" & j).Value >= 0.95 Then   
  18.     If IsError(Application.VLookup(Wb.Worksheets("New form of payment report").Range("B" & j).Value, Worksheets("outstanding payments").Range("A:A"), 1, False)) Then   
  19.     Worksheets("outstanding payments").Range("A" & i + 1) = Wb.Worksheets("New form of payment report").Range("B" & j).Value
  20.     Worksheets("outstanding payments").Range("F" & i + 1) = Wb.Worksheets("New form of payment report").Range("K" & j).Value
  21.     End If
  22.     i = i + 1
  23.     End If
  24.     j = j - 1   
  25.    Loop While j = 2  
  26.    
  27.    Wb.Close 0
  28. End Sub
½Æ»s¥N½X
½Ð°Ý
Do
Loop While
¬O¤£¬O¼g¿ù¤F¡H¥L¤£À´±o´`Àô°µ
§@ªÌ: GBKEE    ®É¶¡: 2012-12-14 14:54

¦^´_ 42# 198188
2003ª© ¨S¦³EDIT FORMATING RULE ³o¥\¯à
¦ý¦³ «ü¥O[®æ¦¡]->[³]©w®æ¦¡¤Æ±ø¥ó] :¼g¤½¦¡ ,«ü©wÃC¦â
©Î¬OVBA
  1. Option Explicit
  2. Sub Ex()  'Äæ³]©w¦pªGBÄæ¬O­È¤j¹L0 ©M¤£µ¥©óAÄæ´NÅÜÃC¦â
  3.     'Á|¨Ò [A1]:[B1]
  4.     If [B1] >= 0 And [B1] <> [A1] Then
  5.         With Range("A1")
  6.             .Interior.Color = vbYellow  '©³¦â    :¶À
  7.             .Font.Color = vbRed         '¦rÅé¦â  :¬õ
  8.             .Font.Size = 15             '¦rÅé¤Ø¤o:15
  9.         End With
  10.     End If
  11. End Sub
½Æ»s¥N½X

§@ªÌ: GBKEE    ®É¶¡: 2012-12-14 15:10

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-12-14 15:16 ½s¿è

¦^´_ 43# 198188
  1. Do
  2. '
  3. '
  4. MSGBOX J  '¬d¬Ý J=??? ²Å¦X±ø¥ó¶Ü!!
  5. Loop While J=2   
  6. '°õ¦æªº±ø¥ó While (¤@ª½¬O) :  J=2
  7. 'Â÷¶}ªº±ø¥ó UNTIL (ª½¨ì¬O):   J=2
½Æ»s¥N½X
§A¬O­nLoop While J>=2  ??
§A¬O­nLoop While J<>2  ??
§A¬O­nLoop While J<=2  ??
§A¬O­nLoop While J<2     ??
§@ªÌ: tmde987    ®É¶¡: 2012-12-16 12:31

If Target.Column = 1 Then   ³o­Ó¦n¹³¬O ·j´M½d³ò  ¥L­n±N Target §ï¦¨  "TT"  ¡A¥u¬O ¬Ý¤F¬Ý¡A·Pı¤£¶¶.....
§@ªÌ: 198188    ®É¶¡: 2013-3-9 09:42

¦^´_ 3# GBKEE

°ª¤H¡A¥i§_À°§Ú¬Ý¬Ý­Óµ{¦¡°ÝÃD¡H
    http://forum.twbts.com/viewthrea ... amp;page=2#pid51122




Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)