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

[µo°Ý] ÁÙ¬O¤@­Ó¤ñ¹ïªº°ÝÃD

[µo°Ý] ÁÙ¬O¤@­Ó¤ñ¹ïªº°ÝÃD

§Úı±o Excel VBA ¤ñ¹ïªº¼gªk¯uªº¬O¶W½ÆÂø¡A¤@ª½¦n¹³³£§ì¤£¨ì­«ÂI
§Ú­n¥Î¤u§@­¶TempªºA¡BBÄæ©M¤u§@­¶Sheet1ªºD¡BGÄæ¤ñ¹ï¡C
¦pªGTemp-AÄæ©MSheet1-DÄæ¬Û¦P¡A´N¤ñ¹ï¥¦­Ì¦U¦Û¹ïÀ³ªºB¡BGÄæ(¼Æ­È)¡A¦pªG¼Æ­È¤£¦P¡A´N¦bSheet1-BÄæ¼Ð°O¥X"?"
¼Æ­È¬Û¦P´N¼Ð°O¥X"V"¡A¤ñ¹ï¤£¨ìªº´N¤£°µ¥ô¦ó°Ê§@¡C

§Úªº´ú¸ÕÀɤñ¹ï¥X¨Óªºµ²ªG¡A§¹¥þ¤£²Å©Ò»Ý¡A§Ú¹ê¦b¤]§ä¤£¥X­þ¸Ì¦³°ÝÃD¡C
test.rar (24.77 KB)
Jess

  1. Sub ¸ê®Æ¤ñ¹ï()

  2. For r = 12 To Sheets("Sheet1").[D65536].End(xlUp).Row
  3.      
  4.     With Sheets("Sheet1")
  5.         A = .Cells(r, "D").Value
  6.         B = .Cells(r, "G").Value
  7.     End With
  8.    
  9.     For rr = 1 To Sheets("Temp").[A65536].End(xlUp).Row
  10.    
  11.         If A = Sheets("Temp").Cells(rr, "A").Value Then
  12.         
  13.             If B = Sheets("Temp").Cells(rr, "B").Value Then
  14.                 Sheets("Sheet1").Cells(r, "B").Value = "V"
  15.             Else
  16.                 Sheets("Sheet1").Cells(r, "B").Value = "?"
  17.             End If
  18.         
  19.         End If
  20.    
  21.     Next rr

  22. Next r

  23. End Sub
½Æ»s¥N½X
diabo

TOP

  1. Sub ex()
  2. Dim A As Range
  3. Application.ScreenUpdating = False
  4. Set d = CreateObject("Scripting.Dictionary")
  5. With Sheets("Temp")
  6.    For Each A In .Range(.[A1], .[A1].End(xlDown))
  7.      d(A.Value) = A.Offset(, 1).Value
  8.    Next
  9. End With
  10. With Sheets("Sheet1")
  11. .[B:B] = ""
  12.   For Each A In .Range(.[D12], .[D65536].End(xlUp))
  13.      If d.exists(A.Value) = True Then
  14.         If A.Offset(, 3) <> d(A.Value) Then
  15.         A.Offset(, -2) = "?"
  16.         ElseIf A.Offset(, 3) = d(A.Value) Then
  17.         A.Offset(, -2) = "V"
  18.         End If
  19.      End If
  20.   Next
  21. End With
  22. Application.ScreenUpdating = True
  23. End Sub
½Æ»s¥N½X
¦^´_ 1# jesscc
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁÂd¤j©MH¤j¶W§Ö³tªº¸Ñ¨M¤è®×
·Q½Ð°ÝH¤j
²Ä3¡B22¦æ¦³Ãöµe­±§ó·sªº°ÝÃD¡C¬O§_¨M©w©ó­n¤ñ¹ï¸ê®Æ¶qªº¤j¤p¦Ó¶}±Ò©ÎÃö³¬¡CÁÙ¬O»¡¨S¥²­nªº¸ÜºÉ¥i¯à³£Ãö³¬¡C
Jess

TOP

¦^´_ 4# jesscc
¦³Ãöµe­±§ó·sªº°ÝÃD
¬Ý­Ó¤H³ß¦n¦Ó¤w¤£¤@©w­n¥Îªº.

TOP

¦^´_ 5# GBKEE


    ¤F¸Ñ!
ÁÂÁÂH¤j©MG¤j¡C
Jess

TOP

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD