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

[µo°Ý] (¤w¸Ñ¨M)¦p¦ó¦P¤@°Ï¶ô¬Û¦P¸ê®Æ¼ÐÃC¦â

[µo°Ý] (¤w¸Ñ¨M)¦p¦ó¦P¤@°Ï¶ô¬Û¦P¸ê®Æ¼ÐÃC¦â

¥»©«³Ì«á¥Ñ freeffly ©ó 2012-5-11 13:13 ½s¿è

¥H«e¦b¤@¯ë°Ï°Ý¹L¦P¼Ë°ÝÃD
¦p¦ó¦P¤@°Ï¶ô¬Û¦P¸ê®Æ¼ÐÃC¦â
¤£¹L¸ê®Æ¦hªº®É­Ô·|µo¥Íexcel·í±¼ªº·Pı
¤£ª¾¹D¬O¤£¬O«ùÄò¹BºâªºÃö«Y
¦pªG§ï¦¨¥Îvba­n¦p¦ó¼g?
AÄæ­n°µ¹³DÄ樺¼Ëªº®ÄªG

Test.rar (11.36 KB)
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

¦^´_ 1# freeffly

AÄ楲¶·­n±Æ§Ç
  1. Sub xx()
  2. Dim d As Object
  3. Dim Rng As Range
  4. Columns("A").Interior.ColorIndex = 0
  5. Set d = CreateObject("Scripting.Dictionary")
  6. For Each A In Range("A2:A" & [A65536].End(xlUp).Row)
  7.   d(A.Value) = A.Value
  8. Next
  9. Ar = d.Items
  10. For Each A In Range("A2:A" & [A65536].End(xlUp).Row)
  11.   For R = 0 To d.Count Step 2
  12.     If A = Ar(R) Then
  13.       If Rng Is Nothing Then
  14.         Set Rng = A
  15.       Else
  16.         Set Rng = Union(Rng, A)
  17.       End If
  18.     End If
  19.   Next R
  20. Next
  21. Rng.Interior.ColorIndex = 6
  22. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# register313


    ÁÂÁÂ
   ¦r¨åªº¹ï§Ú¨Ó»¡ÁÙ«ÜÃø
   ·Pı¤ñ¤å¨¥¤åÁÙÃø
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

¦^´_ 2# register313

    ¤j¤j
    ­è­èµo²{·|¦³¦C¼Æ­­¨î
   ³o¦U¦³¿ìªk§JªA¶Ü
   ¤Ó¦h¦n¹³·|¥X²{°}¦C¶W¥X½d³òªº°ÝÃD









Book122.rar (9.17 KB)
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

¦^´_ 4# freeffly
¤£¬O¦C¼Æ­­¨î
¤§«eµ{¦¡µy§@­×¥¿
  1. Sub xx()
  2. Dim d As Object
  3. Dim Rng As Range
  4. Dim Ar
  5. Columns("A").Interior.ColorIndex = 0
  6. Set d = CreateObject("Scripting.Dictionary")
  7. For Each A In Range("A2:A" & [A65536].End(xlUp).Row)
  8.   d(A.Value) = A.Value
  9. Next
  10. Ar = d.Items
  11. For Each A In Range("A2:A" & [A65536].End(xlUp).Row)
  12.   For R = 1 To d.Count - 1 Step 2
  13.       If A = Ar(R) Then
  14.       If Rng Is Nothing Then
  15.         Set Rng = A
  16.       Else
  17.         Set Rng = Union(Rng, A)
  18.       End If
  19.     End If
  20.   Next R
  21. Next
  22. Rng.Interior.ColorIndex = 6
  23. End Sub
½Æ»s¥N½X

TOP

¦^´_ 5# register313


    ¤j¤j½Ð°Ý²Ä12¦æ¥N½Xªº·N«ä

   ¦pªG¥Î­ì¥N½X «á­±¥[-1¤]¥i¦æ
  1. For R = 0 To d.Count - 1 Step 2
½Æ»s¥N½X
©Î¬O­ì¥N½X1§ï¬°0¤]¦æ
  1. For R = 1 To d.Count  Step 2
½Æ»s¥N½X
¤j¤j·sªº¥N½X¬O³o¦U ÁÙ¦³Dim Ar
  1. For R = 1 To d.Count - 1 Step 2
½Æ»s¥N½X
§@¤F¤§«á¼ÐÃC¦â°Ï¶ô¦³ÂI¤£¤@¼Ë ¥i¬O·|¦P¼Ë®ÄªG
   ¤]¤£·|¥X²{°}¦C¶W¥X½d³ò
   ¬°¤°»ò·|¦³®t²§?
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

¦^´_ 6# freeffly

»¡©ú¸Ô¨£ÀÉ®×
Test.rar (13.89 KB)

TOP

¦^´_ 7# register313


    ÁÂÁ¤j¤j
   for to step ³o¦U¤§«e¨S¥Î¹L
   ¬Ý¨ìªþ¥ó¤~ª¾¹D¬Ocountªº¼Æ¶q¬O°¸¼Æ©Î³æ¼Æ³y¦¨
   ¾Ç²ß¤F
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

¦^´_ 1# freeffly


    ÁÂÁ½׾Â,ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨Ò
«á¾ÇÂǦ¹©«½m²ß°}¦C»P¦r¨å,¾Ç²ß¤è®×¦p¤U,½Ð«e½ú°Ñ¦Ò,½Ð¦U¦ì«e½ú«ü±Ð

°õ¦æ«e:


°õ¦æµ²ªG:



Option Explicit
Sub TEST()
Dim Brr, Y, i&, T$
Dim xR As Range, xU As Range
Set Y = CreateObject("Scripting.Dictionary")
Set xR = Range([A2], Cells(Rows.Count, "A").End(3)): Brr = xR
Set xU = [A1]
For i = 1 To UBound(Brr)
   T = Brr(i, 1)
   If Y(T) = "" Then Y(T) = Y.Count
   If Y(T) Mod 2 = 0 Then Set xU = Union(xU, Cells(i + 1, 1))
Next
[A:A].Interior.ColorIndex = xlNone
xU.Interior.ColorIndex = 6
Set Y = Nothing: Set xR = Nothing: Erase Brr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªk­n¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí ¤W¤@¥DÃD