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

[µo°Ý] ¸ê®Æ®w¤ñ¹ïªº°ÝÃD

[µo°Ý] ¸ê®Æ®w¤ñ¹ïªº°ÝÃD

¦U¦ì¤j¤j¡A§Ú·Q½Ð°Ý¤@¤U¡A­Y¬O§Ú¦³A¸òB¸ê®Æ®w¡A°²³]§Ú·Q§PÂ_B¸ê®Æ®w¤¤ªºAÄæ¦ì(¥HA¸ê®Æ®w¬°¥D)¡A
¤Ö¤F­þ¨Ç©ÎªÌ¦h¤F­þ¨Ç¸ê°T¡A¥H¦¹Ãþ±À¡A¦bA¸ê®Æ®w¤¤ªºBÄæ¦ìCÄæ¦ì¡A½Ð°Ý§Ú¸Ó¦p¦ó¸Ñ¨M³o¼Ëªº°ÝÃD©O!?

ªþ¤WEXCELÀÉ¡A­Y¬O¥i¥H§Æ±æ¯à°÷¥ÎACCESS¸Ñ¨M©ÎªÌ¨Ï¥Î¥¨¶°¡A

¥Ø«eª¾¹Dªº²Â¤èªk´N¬O¥ý¨Ì·Ó»¼¼W©Î»¼´î±Æ§Ç¡A¶K¨ìEXCEL«á¦b¥[¤W¨ç¼Æ§PÂ_¨âµ§¸ê®Æªº¦U­ÓÄæ¦ì¡A¦ý§Ú¬Û«H¹q¸£¤@©w¦³§ó§Öªº¤è¦¡ ^^"¡A¥ýÁÂÁ¦U¦ì°ª¤â ^_^


A»PB¸ê®Æ®w.rar (29.54 KB)

¦^´_ 1# fusayloveme
  1. Sub xx()
  2. Sheets("A¸ê®Æ®w").Select
  3. Set SourceA = Sheets("A¸ê®Æ®w").Range([A2], [A65536].End(xlUp))
  4. Sheets("B¸ê®Æ®w").Select
  5. Set SourceB = Sheets("B¸ê®Æ®w").Range([A2], [A65536].End(xlUp))
  6. For Each A In SourceA
  7.   X = Application.CountIf(SourceB, A) - Application.CountIf(SourceA, A)
  8.   If X <> 0 Then
  9.      Set RFind = Columns("E").Find(A, , , xlWhole)
  10.      If RFind Is Nothing Then
  11.        [E65536].End(xlUp).Offset(1, 0) = A
  12.        [E65536].End(xlUp).Offset(0, 1) = X
  13.      End If
  14.   End If
  15. Next A
  16. For Each B In SourceB
  17.   X = Application.CountIf(SourceB, B) - Application.CountIf(SourceA, B)
  18.   If X <> 0 Then
  19.      Set RFind = Columns("E").Find(B, , , xlWhole)
  20.      If RFind Is Nothing Then
  21.        [E65536].End(xlUp).Offset(1, 0) = B
  22.        [E65536].End(xlUp).Offset(0, 1) = X
  23.      End If
  24.   End If
  25. Next B
  26. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ fusayloveme ©ó 2012-3-12 09:13 ½s¿è

¦^´_ 2# register313

¥ýÁÂÁÂregister313¤j¤j ^_^¡A¦]¬°¤p§Ì§Úªí¹Fªº¥i¯à¤£²M·¡¡A§Ú±N§Úªºµ²ªG¦pEXCELÅã¥Ü¡A¤j·§¬O³o¼Ë¡A¦³A»PB¸ê®Æ®w(¥HA¸ê®Æ®w¬°¥ÀÅé)¡A
¦ý§Ú»Ý­n±NA¸òB¸ê®Æ®w¤£¦Pªº¦a¤è¤ñ¹ï¥X¨Ó¡A±Nµ²ªG¤À¬°A¸ê®Æ®w¯Ê¤Ö¡BB¸ê®Æ®w¯Ê¤Ö¡BA»PB¸ê®Æ®w³£¦³ªº¥H¤ÎA»PB¸ê®Æ®w³£¯Ê¤Öªº¡A
³o¥|ºØ«¬¦¡¡Aµ²ªG¦p§ÚEXCEL¤º®e©Ò¥Ü¡A¥t¥~­Y¦A[ControlNO]³o­ÓÄæ¦ì¡A¤@¶}©l»PA¸ê®Æ®w(¥ÀÅé)¦³¥X¤J¡A·N«ä´N¬O¦³¿ù»~ªº¸Ü¡A
«h¤@¾ã¦C³£¬O¿ùªº(¦p§Ú©Ò¼Ð¥Üªº¶À¦â¤è¶ô)¡A°ò¥»¤è¦V¤j·§¬O³o¼Ë¡A¤£¾å±o¬O§_¯à§Q¥ÎVBA°µ¨ì©O¡Aºô¸ô¤W¦³¤U¸ü¤@­Ó»P§Ú·Qªk±µªñªº¥¨¶°¡A
´£¨Ñµ¹register313¤j¤j¥H¤Î¦U¦ì¤j¤j°Ñ¦Ò¡C

ÁÂÁÂregister313¤j¤j¡Aµ§¼Æªº®t²§ªº½T¹ï§Ú¤]¬O«Ü¦³À°§U ^_^

A»PB¸ê®Æ®w½d¨Ò.rar (10.56 KB)    
¸ê®Æ¤ñ¹ï½d¨Ò.rar (570.18 KB)

TOP

¥»©«³Ì«á¥Ñ fusayloveme ©ó 2012-3-12 17:45 ½s¿è

¦^´_ 2# register313

¤£¦n·N«ä~¥t¥~¦b¸É¥R¤@¤U¡A´£¨Ñªº¨º­Ó¸ê®Æ¤ñ¹ï¥¨¶°ÀɮסA¸ûµLªk¾A¥Îªº­ì¦]¬O¡AÄæ¦ì¤£¦P¡A¥L«h·|§P©w¬O¬°¤£²Å¦X¡A
¦ý¹ê»Ú¤W¥i¯à¥u¬O¦bB¸ê®Æ®w¤º´¡¤J¤@¦æ©ÎªÌ¤Ö¤@¦æ¡A´N¾É­P¦¹±¡ªpµo¥Í¡A¤£¾å±o§Q¥ÎVBAªº¤@¨Ç»yªk¯à§_ÁקK¦p¦¹±¡ªpµo¥Í©O¡A´N¬O¦pªG¯à°÷¤£¬Ý±Æ¦C¶¶§Ç¡A
¦ýAÄd¡BCÄd¡BEÄd¦pªG¿ù»~¡A«h¾ã¦C¿ù»~¡A¤£¾å±o¯à§_¨Ì·Ó³o¼Ëªº¤è¦¡¶i¦æ§P©w©O!? ÁÂÁ¡C

TOP

¦^´_ 4# fusayloveme

¨ä¹ê¤@¶}©l´Nı±oÃD¥Ø©Ç©Çªº(©ÎªÌ»¡§A¨S§âÃD¥Ø,¥\¯àÁ¿²M·¡;©ÎªÌ»¡§Ú²z¸Ñ¯à¤O¤£°÷,¨S§â§Aªº»¡©ú§Ë²M·¡)
1.A¸ê®Æ®w,B¸ê®Æ®w¬O§_¥u¤ñ¹ïAÄæ¦ì(ControlNO)?
  ­Y¬O:AÄæ¦ì(ControlNO)¤Uªº¤º®e¦³­«ÂЪº,¨º­n¦p¦ó¤ñ¹ï?  ³o´N¬O§Ú¤@¶}©l¥u¤ñ¹ï¼Æ¶q®t²§ªº­ì¦]
  ­Y§_:°£AÄæ¦ì¥~,À³§âBÄæ¦ìCÄæ¦ì§e²{¥X¨Ó
2.§A3F,4F©ÒÁ¿ªº§Ú¤]¤£¤F¸Ñ·N«ä

TOP

§Úªº§@ªk
·s³Ð ¸ê®Æ®w  C
¥HA¸ê®Æ®w¬°¥D  ¥h¤ñ¹ï B¸ê®Æ®w
¥Î´`Àôªº¤è¦¡
¦p
if sheet1.range("a1").value <> sheet2.range("a1").value then
     sheet3.range("a1").value = "¤£¬Û¦P"
endif

TOP

¥»©«³Ì«á¥Ñ fusayloveme ©ó 2012-3-12 17:46 ½s¿è

¦^´_ 5# register313

§Ú¯à²z¸Ñ±zªº·N«ä¡A·íªì¤]¬O¦b·Q¦]¬°¨âµ§¸ê®Æ¨S¦³°ß¤@©Ê¡A©Ò¥HµLªk¥h¤ñ¹ï¡A¥u§Q¥Î¦@³q©Ê¤ñ¹ïªº¸Ü¡A±ø¥ó¤£¨¬°÷Åý¤ñ¹ï¦¨¥ß¡A
³o¤]¬O§Ú¥Ø«e¦b°µÃöÁp¸ê®Æ®wªº§xÂZ¡A¤£¹L¡AÁÙ¬O·Q½Ð°Ý¤j¤j¡A­Y°²³][ControlNO]ªº±¡ªp¬O°ß¤@©Êªº¸Ü¡A¦³¿ìªk¹³§Ú3F©Ò´£¨Ñªº
"A»PB¸ê®Æ®w½d¨Ò"³o¼Ë°µ¥X¨Ó¶Ü? ÁÂÁ¤j¤jªº¼ö¤ß ^_^

AÄd¡BCÄd¤ÎEÄdªº¤ñ¹ï¡A¥D­n¬O¥ÑAÄd¨M©w¡AAÄd½T»{¹ï¤F¤~·|¶i¦æ¤U¤@¨BªºCÄd¡BEÄd¤Î«á­±Äæ¦ìªº¤ñ¹ï¡A¤j·§¬O´Â¦V³o¼Ëªº¤è¦V~

TOP

¦^´_ 6# mark15jill

¥ýÁÂÁ¤j¤jªº¼ö¤ß ^_^¡A¥Ñ©ó¥i¯à·|¦³­«ÂЪº¡A©Ò¥H§PÂ_±ø¥ó¥i¯à­n¦AÂÔ·V¡AÅý¨ä§PÂ_ªº¯S©Ê¦¨¬°°ß¤@¡A³o¼Ë¤ñ¹ï·|¤ñ¸û¦³·N¸q¡A§_«h´N¦p¦P¤G¼ÓR¤j©Ò»¡
·|µLªk¤ñ¹ï¡A¦]¬°¥i¯àA¸ê®Æ®w¤ºªºEXXXXX¡A¦ýB¸ê®Æ®w¤º¦P®É¦³¤­µ§EXXXXX¡A©Ò¥H¤ñ¹ï«á¡AµLªk¤¬¬Û¤ñ¹ï¡A¾É­P¥þ³¡¬°¤£²Å¦X¡A¤Ï¤§A¸ê®Æ­Yµ§¼Æ¸û¤Ö¤]·|µo¥ÍÃþ¦ü±¡ªp¡A
©Ò¥H³Ì¦nªº¿ìªk¥ý§ä¥X¨ä°ß¤@©Ê¡A°µ¬°¤ñ¹ïªº¥ý¨M±ø¥ó¤ñ¸û¦n¡A³o¬O§Ú³Ìªñ¦b°µ¸ê®Æ®wªº¤ß±o¡A·Pı¤WÁÙ¬O³Q¥´¦^­ì§Î>< «s

TOP

¦^´_ 7# fusayloveme
A¸ê®Æ®w(B¸ê®Æ®w)¤§AÄæ¦ì¨S¦³­«ÂЭÈ
  1. Sub xx()
  2. Sheets("¤ñ¹ïµ²ªG").[A2:D65536] = ""
  3. Sheets("A¸ê®Æ®w").Activate
  4. Set SourceA = Sheets("A¸ê®Æ®w").Range([A2], [A65536].End(xlUp))
  5. Sheets("B¸ê®Æ®w").Activate
  6. Set SourceB = Sheets("B¸ê®Æ®w").Range([A2], [A65536].End(xlUp))
  7. Sheets("¤ñ¹ïµ²ªG").Activate
  8. Sheets("¤ñ¹ïµ²ªG").[A2:D65536] = ""
  9. For Each A In SourceA
  10.   X = Application.CountIf(SourceB, A) - Application.CountIf(SourceA, A)
  11.   If X = 0 Then
  12.      Sheets("¤ñ¹ïµ²ªG").[C65536].End(xlUp).Offset(1, 0) = A
  13.   Else
  14.      Sheets("¤ñ¹ïµ²ªG").[B65536].End(xlUp).Offset(1, 0) = A
  15.   End If
  16. Next A
  17. For Each B In SourceB
  18.   X = Application.CountIf(SourceB, B) - Application.CountIf(SourceA, B)
  19.   If X = 1 Then
  20.      Sheets("¤ñ¹ïµ²ªG").[A65536].End(xlUp).Offset(1, 0) = B
  21.   End If
  22. Next B
  23. End Sub
½Æ»s¥N½X

TOP

¦^´_ 9# register313

·PÁÂR¤jªºÀ°¦£¡A°J¤ßªºÁÂÁ±z ^_^

TOP

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