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

[µo°Ý] Excel VBA ¨Ì±ø¥óÀx¦s®æ¤Ï¦â

ªþ¥ó¤W¶Ç¬°¦ó¤£¥Î¥»½×¾Âªº¤è¦¡???

TOP

Sub ifcolor_1()
Dim R&, C&, xR As Range, Cv%, Cr, i&, j%
R = Cells(Rows.Count, 2).End(xlUp).Row
C = Cells(2, Columns.Count).End(xlToLeft).Column
Cr = Array(16, 48, 15) '¾î¦Vªº¦â¸¹(¦Û¦æ§ó§ï)
With [B2].Resize(R - 1, C - 1)
     .Interior.ColorIndex = xlNone: .Font.Bold = False
     For Each xR In .Rows(1).Cells
         Cv = Switch(xR = "¥Ø¼Ð", 34, xR = "¹F¦¨", 33, xR = xR, 0) 'Áa¦Vªº¦â¸¹(¦Û¦æ§ó§ï)
         If Cv > 0 Then
            With xR.Resize(R - 1): .Interior.ColorIndex = Cv: .Font.Bold = True: End With
         End If
     Next
     For i = 2 To R - 1:  For j = 1 To 3
         If .Cells(i, j) = "All" Then
            With .Cells(i, j).Resize(1, C - j)
                 .Interior.ColorIndex = Cr(j - 1): .Font.Bold = True
            End With
            Exit For
         End If
     Next:  Next
End With
End Sub

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD