ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð±Ð§ï¨}³t«×¤èªk

¦^´_ 38# GBKEE


    ¥t¥~½Ð°Ý¥i§_¦bexcel ªºEDIT FORMATING RULE³]©w
¦bAÄæ³]©w¦pªGBÄæ¬O­È¤j¹L0 ©M¤£µ¥©óAÄæ´NÅÜÃC¦â

TOP

¥»©«³Ì«á¥Ñ 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

TOP

¦^´_ 38# GBKEE

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

TOP

¥»©«³Ì«á¥Ñ 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´`Àô°µ

TOP

¦^´_ 3# GBKEE

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

TOP

        ÀR«ä¦Û¦b : §g¤l¬°¥Ø¼Ð¡A¤p¤H¬°¥Øªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD