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

½Ð°Ý«ç¼Ë±N¤£¦P¦â±m¼Æ¥Ø¬Û¥[

¥u¤À¦­¡B¤È¡B±ß, ¤£¤À·|ij«ÇA¡BB¡BC¶Ü?

TOP

¤£ª¾¹D VBA ¥i¤£¥i¥H±µ¨ü?
'ª`·N:¬°¤F¤é´Áªº¥iÂX®i©Ê, ­ì J1:J3 ¤w²¾¦Ü B16:B18
'½Ð®Ú¾Ú»Ý­n, ¦Û¦æ§ó§ï
Private Sub CommandButton1_Click()
    Dim Ar
    Dim R1 As Integer, C1 As Integer, LstC As Integer, CN As Integer
    Dim MC As Integer, AC As Integer, EC As Integer
   
    [B11:H13] = ""
    LstC = [IV2].End(xlToLeft).Column
    MC = [B16].Font.ColorIndex   '¤W¤ÈÃC¦â
    AC = [B17].Font.ColorIndex   '¤U¤ÈÃC¦â
    EC = [B18].Font.ColorIndex   '晩¤WÃC¦â
   
    For R1 = 2 To 8
        For C1 = 2 To LstC
            If Cells(R1, C1) <> "" Then
                CN = Cells(R1, C1).Font.ColorIndex
                If CN = MC Then
                    Cells(11, C1) = Cells(11, C1) + Cells(R1, C1)
                ElseIf CN = AC Then
                    Cells(12, C1) = Cells(12, C1) + Cells(R1, C1)
                Else
                    Cells(13, C1) = Cells(13, C1) + Cells(R1, C1)
                End If
            End If
        Next
    Next
End Sub
test.gif

TOP

        ÀR«ä¦Û¦b : ¤H¨ÆªºÁ}Ãø»PµZ¿i¡A´N¬O¤@ºØ¦ÒÅç¡C
ªð¦^¦Cªí ¤W¤@¥DÃD