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

[µo°Ý] ½Ð°Ý¦p¦ó§ó§ï³o¤@­Órangeªº¼Æ­È

[µo°Ý] ½Ð°Ý¦p¦ó§ó§ï³o¤@­Órangeªº¼Æ­È

¥»©«³Ì«á¥Ñ joseph2003 ©ó 2011-1-31 22:08 ½s¿è

Sub Find_Num()
For Each Found_Num In Worksheets(2).Range("A1:F3")
    For Each Data In Worksheets(1).Range("A1:AI20")
        If Data.Value = Found_Num Then
            Data.Interior.ColorIndex = 3
        End If
    Next Data
Next Found_Num
End Sub
--------------------------------------------------------------------------------------------------
¦pªG­n§ï¦¨
Worksheets(2).Range("A1:F1")对应Worksheets(1).Range("A1:AI5")
Worksheets(2).Range("A2:F2")对应Worksheets(1).Range("A6:AI10")
Worksheets(2).Range("A3:F3")对应Worksheets(1).Range("A11:AI15")
.........
.........
¥H¦¹Ãþ±À

¤]´N¬O»¡sheets(2)¨C¹j¤­¦C¥u©â¨úsheet(1)¤@¦Cªº¸Ü
­n¦p¦ó§ï¼g©O

Book1.rar (7.72 KB)

Áٽаª¤âÀ°À°¦£
·P¿E¤£ºÉ

¦^´_ 1# joseph2003

³oºØ°ÝÃDÀ³¸Ó¨Ï¥Î®æ¦¡¤Æ±ø¥ó§Y¥i¹F¦¨
­Y¤@©w­n¨Ï¥ÎVBA
  1. Sub Find_Num()
  2. For Each a In Range("A:AI").SpecialCells(xlCellTypeConstants)
  3.   r = Int((a.Row - 1) / 5) + 1
  4.   Set c = Sheets(2).Rows(r).Find(a)
  5.   If Not c Is Nothing Then a.Interior.ColorIndex = 3 Else a.Interior.ColorIndex = 0
  6. Next
  7. End Sub
½Æ»s¥N½X
ªþ¥ó¤¤§t¦³®æ¦¡¤Æ±ø¥ó§@ªk
findcell.rar (10.12 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦A°ÝHsieh¦Ñ®v
±zªºvba»yªk¹ê»Ú´ú¸Õ«á§ì¨úsheet1ªº¼Æ¦r¬O¿ùªº
§Ú¤£ª¾¹D­n­×¥¿­þ­Ó³¡¥÷
¥i§_¦A½Ð±z«üÂI¤@¤U
ÁÂÁÂ

TOP

¦^´_ 3# joseph2003
  1. Sub Find_Num()
  2. For Each a In Range("A:AI").SpecialCells(xlCellTypeConstants)
  3.   r = Int((a.Row - 1) / 5) + 1
  4.   Set c = Sheets(2).Rows(r).Find(a, lookat:=xlWhole)
  5.   If Not c Is Nothing Then a.Interior.ColorIndex = 3 Else a.Interior.ColorIndex = -4142
  6. Next
  7. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

·PÁÂHsieh¦Ñ®v

°ÝÃD¤w¨Ì±zªº»yªk¦Ó¸Ñ¨M

TOP

        ÀR«ä¦Û¦b : §Ú­Ì³Ì¤jªº¼Ä¤H¤£¬O§O¤H¡D¥i¯à¬O¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD