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

[µo°Ý] ·Q½Ð±Ð¦³Ãö­pºâ­«½Æ¦W¦r±Æ§Çªº»yªk

[µo°Ý] ·Q½Ð±Ð¦³Ãö­pºâ­«½Æ¦W¦r±Æ§Çªº»yªk

°ÝÃD¦p¤U:
¦bC3:C1002¤§¶¡¦³«Ü¦hªº¦W¦r
¨ä¤¤¦³³\¦h¬O­«½Æªº

·Q¦bM4~M13¤º¦C¥X­«Âг̦hªº«e10¦W

½Ð±ÐªO¤Wªº¥ý¶i³f°ª¤â¤£§[½ç±Ð
ÁÂÁÂ~:D

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-10-24 06:55 ½s¿è

¦^´_ 5# united7878
¬O¥²¶·¸Ñ°£CÄæ»PIUÄæ©ÎLÄæMÄ椧¸ê®Æ»PÀx¦s³¡¤ÀÄæ¦ìªºÂê©w.
«OÅ@¤u§@ªí¦³³\¦h¿ï¶µ,¥i°Ñ¦ÒVBA»¡©ú, Protect ¤èªk.
½Ð¿ï¾Ü ±Æ§Ç,¨Ï¥Î¦Û°Ê¿z¿ï
  1. Option Explicit
  2. Sub Ex()
  3.     ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
  4.         , AllowSorting:=True, AllowFiltering:=True
  5. End Sub
½Æ»s¥N½X


Ex_¶i¶¥¿z¿ï ¶·­×§ï¤@¤U
  1. Sub Ex_¶i¶¥¿z¿ï()
  2.     Dim Rng(1 To 3) As Range
  3.     '****************************************************************
  4.     Set Rng(1) = [c3:c1002]     '¸ê®Æ®w½d³ò: c3­n¬O¬°¸ê®Æ®wªºÄæ¦ì¼ÐÀY
  5.     '****************************************************************
  6.     Set Rng(2) = [IU:IV]          '¤u§@ªí³Ì«á²Ä2Äæ:¶i¶¥¿z¿ï,¸ê®Æ½Æ»s¨ì ªºÀx¦s®æ
  7.     Set Rng(3) = [M4:N13]       '©ñ¸m­«Âг̦hªº«e10¦W ªºÀx¦s®æ
  8.     Rng(2) = ""  'Rng(2)¥²»Ý¬O¨S¦³¸ê®Æ
  9.    
  10.     Rng(1).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Rng(2).Cells(1), Unique:=True
  11.     '¶i¶¥¿z¿ï¤£­«½Æªº¸ê®Æ(Unique:=True)
  12.     With Rng(2)
  13.         .Sort KEY1:=Rng(2).Range("a1"), Order1:=xlDescending, Header:=xlYes
  14.         '½d³òªº¥Ñ¤j¨ì¤pªº±Æ§Ç(Order1:=xlDescending)
  15.     End With
  16.     With Range(Rng(2).Cells(1), Rng(2).Cells(1).End(xlDown))
  17.         .Offset(1, 1).FormulaR1C1 = "=COUNTIF(" & Rng(1).Address(, , xlR1C1) & ",RC[-1])" '
  18.         '¼g¤W¤u§@ªí¨ç¼ÆCOUNTIF
  19.     End With
  20.     With Rng(2)
  21.         .Sort KEY1:=Rng(2).Range("b1"), Order1:=xlDescending, Header:=xlYes
  22.     End With
  23.     Rng(3) = Rng(2).Range("A2").Resize(10, 2).Value   '¸ê®Æ½Æ»s
  24. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# GBKEE

¦A½Ð±ÐGBKEE¤j®v
¦pªG¦b¦³«OÅ@¤u§@ªíªºª¬ºA¤U
¸Ó¸Ñ°£CÄæ»PIUÄæ©ÎLÄæMÄ椧¸ê®Æ»PÀx¦s³¡¤ÀÄæ¦ìªºÂê©w¶Ü?

¦]¬°§Ú¦b«OÅ@¤u§@ªí(¿ï¨ú¥¼Âê©wªºÀx¦s®æ)ª¬ºA¤UµLªk°õ¦æ¥¨¶°«ü¥O
¥X²{¿ù»~½X'1004'
§Ú«á¨Ó¸ÕµÛ¸Ñ°£C¡BIU¡BL¡BMÄ檺Âê©w
¦ý¨ÌµM¤£¦æ
¤@¼Ë¬O'1004'
½Ð°Ý³o¦³¸Ñ¶Ü?

ÁÂÁ·P®¦~

TOP

¦^´_ 3# united7878
[Ex_¶i¶¥¿z¿ï] ¥i¥H¬O¤@¯ë¼Ò²Õ,©Î¬O³o¤u§@ªí¼Ò²Õ¤Wªºµ{§Ç(¥¨¶°)
  1. Option Explicit
  2. Private Sub Worksheet_Change(ByVal Target As Range) '³o¤u§@ªí¼Ò²Õªº¹w³]¨Æ¥óµ{§Ç
  3.     Application.EnableEvents = False
  4.     If Not Application.Intersect(Target, [c3:c1002]) Is Nothing Then Ex_¶i¶¥¿z¿ï
  5.     Application.EnableEvents = True
  6. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

·PÁÂG¤j¡A¥i¥H¥Î¤F

¦A¤@¦¸½Ð±ÐG¤j
¦pªGÀx¦s®æM4:M13­nÀHµÛ¸ê®Æ®æC3:C1002²§°Ê¦Ó§Y®ÉÅܰʱƦWªº¸Ü
¸Ó­×§ï­þ­Ó³¡¤À?

ÁÂÁÂ~

TOP

¦^´_ 1# united7878
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex_¶i¶¥¿z¿ï()
  3.     Dim Rng(1 To 3) As Range
  4.     '****************************************************************
  5.     Set Rng(1) = [c3:c1002]     '¸ê®Æ®w½d³ò: c3­n¬O¬°¸ê®Æ®wªºÄæ¦ì¼ÐÀY
  6.     '****************************************************************
  7.     Set Rng(2) = [IU1]          '¤u§@ªí³Ì«á²Ä2Äæ:¶i¶¥¿z¿ï,¸ê®Æ½Æ»s¨ì ªºÀx¦s®æ
  8.     Set Rng(3) = [M4:N13]       '©ñ¸m­«Âг̦hªº«e10¦W ªºÀx¦s®æ
  9.     Rng(2).CurrentRegion = ""   'Rng(2)¥²»Ý¬O¨S¦³¸ê®Æ
  10.    
  11.     Rng(1).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Rng(2), Unique:=True
  12.     '¶i¶¥¿z¿ï¤£­«½Æªº¸ê®Æ(Unique:=True)
  13.    
  14.     With Range(Rng(2), Rng(2).End(xlDown)).Offset(1)
  15.         .Offset(, 1).FormulaR1C1 = "=COUNTIF(" & Rng(1).Address(, , xlR1C1) & ",RC[-1])" '
  16.         '¼g¤W¤u§@ªí¨ç¼ÆCOUNTIF
  17.         Rng(2).CurrentRegion.Sort KEY1:=Rng(2).Range("b1"), Order1:=xlDescending, Header:=xlYes
  18.         'Rng(2).CurrentRegion(³sÄò½d³ò)ªº¥Ñ¤j¨ì¤pªº±Æ§Ç(Order1:=xlDescending)
  19.         Rng(3) = Rng(2).Range("A2").Resize(10, 2).Value   '¸ê®Æ½Æ»s
  20.     End With
  21. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤@¥y·Å·xªº¸Ü¡A´N¹³©¹§O¤H¨­¤WÅx­»¤ô¡A¦Û¤v·|ªg¨ì¨â¤Tºw¡C
ªð¦^¦Cªí ¤W¤@¥DÃD