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

[µo°Ý] ¦p¦ó§PÂ_§ä¥X¸ê®Æ¨Ã¼Ð¥Ü¤£¦PÃC¦â

¦^´_ 1# luke

¨SªþÀÉ®×?

¤u§@ªí¼Ò²Õ
  1. Private Sub worksheet_change(ByVal target As Range)
  2. If target.Column <= 2 Then
  3.    LR = Sheet2.[A1].End(xlDown).Row
  4.    Set Rng = Sheet2.Range(Sheet2.Cells(1, target.Column * 2 - 1), Sheet2.Cells(LR, target.Column * 2))
  5.    Set X = Rng.Find(target, , , xlWhole)
  6.    If X Is Nothing Then
  7.       target.Interior.ColorIndex = 3
  8.    Else
  9.       target.Interior.ColorIndex = X.Interior.ColorIndex
  10.    End If
  11. End If
  12. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# luke

Àx¦s®æ¶·³v®æ¿é¤J

¤u§@ªísheet1¼Ò²Õ
  1. Private Sub worksheet_change(ByVal target As Range)
  2. If target.Column <= 2 Then
  3.    LR = Sheet2.[A1].End(xlDown).Row
  4.    Set Rng = Sheet2.Range(Sheet2.Cells(1, target.Column * 2 - 1), Sheet2.Cells(LR, target.Column * 2))
  5.    Set X = Rng.Find(target, , , xlWhole)
  6.    If X Is Nothing Then
  7.       target.Font.ColorIndex = 3
  8.    Else
  9.       target.Interior.ColorIndex = X.Interior.ColorIndex
  10.    End If
  11. End If
  12. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# luke

Àx¦s®æ¤w¥ý¥þ³¡¿é¤J¦n,¤@¦¸§PÂ_¥þ³¡Àx¦s®æ

¤@¯ë¼Ò²Õ
  1. Sub xx()
  2. For Each target In [A1].CurrentRegion
  3. If target.Column <= 2 Then
  4.    LR = Sheet2.[A1].End(xlDown).Row
  5.    Set Rng = Sheet2.Range(Sheet2.Cells(1, target.Column * 2 - 1), Sheet2.Cells(LR, target.Column * 2))
  6.    Set X = Rng.Find(target, , , xlWhole)
  7.    If X Is Nothing Then
  8.       target.Font.ColorIndex = 3
  9.    Else
  10.       target.Interior.ColorIndex = X.Interior.ColorIndex
  11.    End If
  12. End If
  13. Next
  14. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD