- ©«¤l
- 438
- ¥DÃD
- 67
- ºëµØ
- 0
- ¿n¤À
- 531
- ÂI¦W
- 30
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-10-30
- ³Ì«áµn¿ý
- 2024-11-19
|
¦^´_ 9# c_c_lai
- Option Explicit
- Sub ex()
- Dim FRng As Range, Wb As Workbook
- Dim A As Range, Rng As Range
- Dim fs As String, xi As Integer
- fs = "C:\Documents and Settings\USER\®à±\payment report 2012.xlsx"
- Set Wb = Workbooks.Open(fs)
- Set FRng = Wb.Sheets("New form of payment report").Range("k:k").Find(Date, lookat:=xlWhole, SearchDirection:=xlPrevious) '¦bb.xlsx ªºKÄæ´M§äµ¥·í¤éªº¤é´Áªº¤@¦C
- If Not FRng Is Nothing Then '°²¦p§ä¨ì
- If FRng.Offset(, -3).Value >= 0.95 Then '°²¦pb.xlsx ³o¦CªºHÄ檺Ȥj¹L©Îµ¥©ó0.95
- '*** Workbooks(A)-> A³oÅܼƦr¦ê¨S¦³¨£¨ì ****
- Set Rng = Workbooks("outstanding payments").Sheets("outstanding payments").Range("a:a").Find(FRng.Offset(, -9), lookat:=xlWhole, SearchDirection:=xlPrevious) ' ¦ba.xlsx ªºAÄæ´M§äb.xlsx ³o¦CªºBÄ檺ȬO§_¦s¦b
- If FRng Is Nothing Then '°²¦p§ä¤£¨ì
- With Workbooks.Open("outstanding payments.xlsm").Sheets("outstanding payments") ' ¦ba.xlsx ªºAÄæ³Ì«á¤@¦C¥[¤Wb.xlsx ³o¦CªºBÄ檺ȡA¤Î ¦ba.xlsx ªºFÄæ³Ì«á¤@¦C¥[¤Wb.xlsx ³o¦CªºKÄ檺È
- xi = .UsedRange.Cells(.UsedRange.Count).Row
- .UsedRange.Cells(xi, "A") = FRng.Offset(, -9).Value
- .UsedRange.Cells(xi, "F") = FRng.Value
-
- End With
- End If
- End If
- End If
- Wb.Close 0
- End Sub
½Æ»s¥N½X ®ÄªG¬O·Q·ípayment report 2012 ¤ºKÄæ¬O¤µ¤Ñªº¤é´Á¡A¦ÓHÄ檺%¹F¨ì95%©Î¥H¤W¡A¥[¤WBÄ檺 SO#¦boutstanding payments ªí¤º¨S¦³ªº¸Ü¡A´N§âpayment report 2012 ¤ºHÄ檺%¹F¨ì95%©Î¥H¤W¡A¤ÎBÄ檺 SO#¦boutstanding payments ªí¤º¨S¦³ªºSO¡ ©ñ¦boutstanding payments ªí¤ºªºAÄ檺³Ì«á¤@¦C¤W ¤ÎFÄ檺¤é´Ácopy¹L¥h¬ÛÀ³¦ì¸m¡C
¦p¹Ï¤¤outstanding payment ¶À¦âªº³¡¤À¡C |
|