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

¦b¤£¦P¤u§@ªí¤¤§ä´M©³¦â¬Û¦Pªº¸ê®Æ¨Ã§R°£

¦b¤£¦P¤u§@ªí¤¤§ä´M©³¦â¬Û¦Pªº¸ê®Æ¨Ã§R°£

¦U¦ì¤j¤j~
·Q½Ð±Ð¤@­Ó°ÝÃD~

¦b¤u§@ªí¤@id¨ºÄæ§ä¨ì¤@¼Ë¦b¤u§@ªí¤G¤¤ºñ¦â©³ªºid¸¹½X«á¡A¦A¤u§@ªí¤@§âºñ¦â©³ªºid¸ê®Æ§R°£


#¦b¤u§@ªí¤G¤¤IDÄæ¦ì(¸ê®Æ·|¼W¥[´î¤Ö¡A¶¶§Ç¤£·|©M¤u§@ªí¤@ªºid¤@¼Ë)ºñ¦â©³ªº¸ê®Æ


·Q½Ð°Ý³o¼Ëvba­n«ç»ò¼g

µ²ªG·Q­n§e²{ªº¼Ë¤l



¦³·Q¨ì­n¥Îdictionary¨Ó°µ ¦ý¨S¦³¼g¹L·Q½Ð¨D¦U¦ìÀ°¦£¡AÁÂÁÂ

¦^´_ 1# Changbanana
¸Õ¸Õ¬Ý
  1. Dim myRow As Integer

  2. Sheets("sheet1").Activate
  3. Range("B2").Select
  4. Do While ActiveCell <> ""
  5.     myRow = WorksheetFunction.Match(ActiveCell, Sheets("sheet2").Range("A:A"), 0)
  6.     If Sheets("sheet2").Cells(myRow, "A").Interior.ColorIndex = 14 Then
  7.         Rows(ActiveCell.Row).Delete
  8.     Else
  9.         ActiveCell.Offset(1, 0).Select
  10.     End If
  11. Loop
½Æ»s¥N½X

TOP

¦^´_ 2# zyzzyva

z¤j~

§âµ{¦¡½X¥´¶i¥h«á¤u§@ªí³£¨S¤ÏÀ³­C

¤£ª¾¹D¬O¨º¨à¥X¤F°ÝÃD

ªþ¤WÀÉ®× ·s¸ê®Æ§¨.zip (387.18 KB)

TOP

¦^´_ 2# zyzzyva


    Åã¥Ü¥Xªº¿ù»~¦p¹Ï
     
      1.png

TOP

¦^´_ 3# Changbanana
ÃC¦âªº°ÝÃD¡AColorIndex¨ºÃä­n§ï¦¨43¡C
¥i¥H²³æ¥ÎmsgboxÀˬdÃC¦â¹ïÀ³ªº¼Æ¦r¡C
  1. mycolor = Sheets(2).Range("A2").Interior.ColorIndex
  2. MsgBox (mycolor)
½Æ»s¥N½X

TOP

¦^´_ 5# zyzzyva


    ­ì¨Ó¦p¦¹~¤w¸g¨S°ÝÃD¤F

    ­ì¨Ó¥i¥H³o¼Ë¬dÃC¦â~

    ·PÁ§Aªº¸Ñµª :)

TOP

¦^´_ 6# Changbanana
¤£«È®ð¡C¦pªGsheet1ªºid³£·|¦bsheet2¥X²{¡A¥u¬O¶¶§Ç¤£¤@¼Ë¡A¨º³o¼Ë´N¥i¥H¤F¡F
¦pªG¤£¤@©wªº¸Ü´N­n¥[¤W¿ù»~³B²z¡A¤£µMmatch§ä¤£¨ìªº®É­Ô´N·|¥X²{¿ù»~°T®§¡C

TOP

¦^´_ 7# zyzzyva

¹ï­C
   
¦]¬°­è­è¦b¥[¸ê®Æ«á¨Ó¤S¤£¦æ

¥¿¦p¦P±z©Ò»¡"sheet1ªºid³£·|¦bsheet2¥X²{"¡A³o¬O¤£¤@©wªº
        
sheet1ªºID¬O·í¤ë¥þ³¡¸ê®Æ

sheet2ªºID¬O·í¤ë³¡¥÷¸ê®Æ¥~¥[´Xµ§«e´X­Ó¤ëªºID¸ê®Æ

¨º­n¸Ó«ç»ò¥[¤W¿ù»~³B²z©O?

²{¦b¤@ª½¥X²{¿ù»~°T®§0.0

TOP

¦^´_ 8# Changbanana
¸Õ¸Õ¬Ý¡C
  1. Dim myRow As Integer

  2. Sheets("¤u§@ªí1").Activate
  3. Range("B2").Select
  4. Do While ActiveCell <> ""
  5.     If IsError(Application.Match(ActiveCell, Sheets("¤u§@ªí2").Range("A:A"), 0)) Then
  6.         ActiveCell.Offset(1, 0).Select
  7.     Else
  8.         myRow = WorksheetFunction.Match(ActiveCell, Sheets("¤u§@ªí2").Range("A:A"), 0)
  9.         
  10.         If Sheets("¤u§@ªí2").Cells(myRow, "A").Interior.ColorIndex = 43 Then
  11.         Rows(ActiveCell.Row).Delete
  12.         Else
  13.             ActiveCell.Offset(1, 0).Select
  14.         End If
  15.         
  16.     End If
  17.    
  18. Loop
½Æ»s¥N½X

TOP

¦^´_ 9# zyzzyva


    ÁÂÁ§A~
   
    ¨S·Q¨ì¥i¥H§Q¥Îmatch¨Ó°µ
   
    ¤S¾Ç¨ì¤F¤@½Ò~~~

TOP

        ÀR«ä¦Û¦b : ¡i¬°µ½Ävª§¡j¤H¥Í­n¬°µ½Ävª§¡A¤À¬í¥²ª§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD