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

½Ð°Ývba­n«ç¼Ë¼g¤~¯àÅý¤å¦rÃC¦â¥æ¤e§e²{@@

½Ð°Ývba­n«ç¼Ë¼g¤~¯àÅý¤å¦rÃC¦â¥æ¤e§e²{@@

¦pÃD¡A­n«ç¼Ë¤~¯àÅý¤å¦rÃC¦â¦p¤U¹Ïªº¤è¦¡§e²{
¨Ò¦p¤@¶}©l¥ÎÂŦâ¡A¹J¨ì¤U¤@­Ó¤£¤@¼Ëªº¦WºÙ®É¡A´«¥t¥~¤@­ÓÃC¦â¼Ð¥Ü
¥Î¨âºØÃC¦â¨Ó¼Ð¥Ü¡A¨C­Ó¦WºÙªº¸ê®Æ¶q¤£¤@©w

³o¬O§Ú¥Ø«e·Q¨ìªº¤èªk¡A¦p¦³°ª¤â¦³§ó¦nªº¤è¦¡Åwªï«ü±Ð~~~
  1. Sub color()
  2.     color1 = -3902908
  3.     color2 = -13270700
  4.     With ActiveSheet
  5.         r = .Columns(1).Find(what:="*", LookIn:=xlValues, SearchDirection:=xlPrevious).Row
  6.         c = color1
  7.         CC = 1
  8.         .Cells(1, "A").Font.color = c
  9.         For i = 1 To r
  10.             a = .Cells(i, "A")
  11.             If i = 1 Then
  12.                 b = .Cells(i + 1, "A")
  13.             Else
  14.                 b = .Cells(i - 1, "A")
  15.             End If
  16.             If a = b Then
  17.                 .Cells(i, "A").Font.color = c
  18.             ElseIf a <> b And CC = 1 Then
  19.                 c = color2
  20.                 CC = 0
  21.                 .Cells(i, "A").Font.color = c
  22.             ElseIf a <> b And CC = 0 Then
  23.                 c = color1
  24.                 CC = 1
  25.                 .Cells(i, "A").Font.color = c
  26.             End If
  27.         Next i
  28.     End With
  29. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¯à·F¤£·F¡A¤£¦p­W·F¹ê·F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD