- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-12-13 14:45 ½s¿è
¦^´_ 38# GBKEE - 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
- Dim i As Integer
- Dim j As Integer
- Dim k As Integer
- i = Worksheets("outstanding payments").Range("A" & Worksheets("outstanding payments").Rows.Count).End(xlUp).Row
- fs = "C:\Documents and Settings\USER\®à±\payment report 2012.xlsx"
- Set Wb = Workbooks.Open(fs)
- With Worksheets("New form of payment report")
- j = Worksheets("New form of payment report").Range("E" & Worksheets("New form of payment report").Rows.Count).End(xlUp).Row
- End With
- Do
- 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
- If IsError(Application.VLookup(Wb.Worksheets("New form of payment report").Range("B" & j).Value, Worksheets("outstanding payments").Range("A:A"), 1, False)) Then
- Worksheets("outstanding payments").Range("A" & i + 1) = Wb.Worksheets("New form of payment report").Range("B" & j).Value
- Worksheets("outstanding payments").Range("F" & i + 1) = Wb.Worksheets("New form of payment report").Range("H" & j).Value
- End If
- j = j - 1
- i = i + 1
- End If
- Loop While j = 1
- Wb.Close 0
- End Sub
½Æ»s¥N½X ¨º»ò¬O¤£¬On¦bworksheets«e±¥[¤Wworkbooks?¦ý¬O¤W¤@¥y¦WºÙ¨S¦³°ÝÃD¡H |
|