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

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

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

¥»©«³Ì«á¥Ñ luke ©ó 2012-4-7 14:01 ½s¿è

¦U¦ì¤j¤j

¤p§Ì·Q¦bsheet1ªíA:B¨âÄæ¥ô¤@Àx¦s®æ¿é¤J¸ê®Æ«á, ¦Û°Ê¥h¤ñ¹ïsheet2 ¨â­Ó¸ê®Æ°Ï,

·ísheet1ªíAÄæ¿é¤J¸ê®Æ«á´N»ÝÀˬdsheet2ªí²Ä1­Ó¸ê®Æ°ÏA:BÄæ(¶À¦â°Ï), ­Y¸ê®Æ¤º®e®æ¦¡¬Û¦P§Y°µ¦P©³¦â³B²z, ­Y¸ê®Æ¤£¬Û¦P´N§â¸Óµ§¸ê®Æ§ï¦¨¬õ¦â

¦P²z, ·ísheet1ªíBÄæ¿é¤J¸ê®Æ«á´N»ÝÀˬdsheet2ªí²Ä2­Ó¸ê®Æ°ÏC:DÄæ(ÂŦâ°Ï), ­Y¸ê®Æ¤º®e®æ¦¡¬Û¦P§Y°µ¦P©³¦â³B²z, ­Y¸ê®Æ¤£¬Û¦P´N§â¸Óµ§¸ê®Æ§ï¦¨¬õ¦â

·Ð½Ð¥ý¶i«ü¾É
TEST8.rar (13.65 KB)

¦^´_ 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

¦^´_ 2# register313


Àɮפw¤W¶Ç

·Ð½Ð«ü¾É

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

¦^´_ 5# register313


    ¨â­Óµ{¦¡´ú¸ÕOK

   ÁÂÁÂregister313

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¨S¦³©Ò¦³Åv¡A¥u¦³¥Í©Rªº¨Ï¥ÎÅv¡C
ªð¦^¦Cªí ¤W¤@¥DÃD