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

[µo°Ý] ¥ÎVBA »s§@Chart

¥»©«³Ì«á¥Ñ hugh0620 ©ó 2011-4-25 11:20 ½s¿è

¦^´_ 1# monstrooilis

   ¼Ó¥D~ ¤U¸ü±zªºªþ¥ó~ ¤Ö¤@­ÓÄæ¦ìby month~ ¬O§_¥i¥H¸É»ô~
   ³o¼Ë¤ñ¸û¦n³B²z~ ±z©Ò»Ý­nªºµ²ªG~
   ­Y¤£ª¾¹D½X«ç»ò¼g~ ¥i¥H¨Ï¥Î[¿ý»s¥¨¶°]ªº¤è¦¡~ ¸Õ¤@¤U~

   ¤U­zµ{¦¡½X»P¼Ó¥D²{¦b¨Ï¥Îªº¤è¦¡,¥i¥H¹F¨ì¬Û¦Pªº¥\¯à~
    Sub CalcGrades()
    StudentID = Val(InputBox("Enter the student ID"))
    If StudentID = False Then Exit Sub    '¦h¤@¦æ~ ¥i¥H¨Ï±z¦b¥¼¿é¤J­Èªº®É­Ô,¤£·|²£¥Í°õ¦æ¤Wªº¿ù»~
    Range("G1").Value = StudentID
    Range("G2").Value = Application.WorksheetFunction.VLookup(StudentID, Range("A2:B" & intLastRow), 2, False)
    lCount = Application.CountIf(Range("B:B"), Range("G2"))
    Mark = Application.SumIf(Range("B:B"), Range("G2"), Range("C:C"))
    Mark = Round(Mark / lCount, 2)
    Range("G3").Value = Mark
    End Sub
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

        ÀR«ä¦Û¦b : ­n¥Î¤ß¡A¤£­n¾Þ¤ß¡B·Ð¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD