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

[µo°Ý] ½Ð±ÐÃö©ó§Q¥Î°j°é§PÂ_¦b»Ý­nªº¦a¤è´¡¤J¦C

[µo°Ý] ½Ð±ÐÃö©ó§Q¥Î°j°é§PÂ_¦b»Ý­nªº¦a¤è´¡¤J¦C

½Ð°Ý¦U¦ì«e½ú­Ì

§Ú¥Ø«e¦³­Ó¤å¥ó¦]¬°¸ê®Æ¶q«ÜÃe¤j
¨C¦¸¾ã²z³£»Ý­n«Ü¤[ªº®É¶¡
©Ò¥H±N¸£µ¬°Ê¨ìVBA¤W¡A§Æ±æ¯àÅý§Úªº¤u§@§ó¦³®Ä²v

¦ý¬O§Ú«o¹J¨ì¤F°ÝÃD..¦Ê«ä¤£±o¨ä¸Ñ¤U¨Ó½Ð«e½úÀ°¦£

¦pªþ¥óªºÀɮסA§Ú·Q­n¦b¨C­Óstep¤¤¶¡´¡¤J¤@¦CªÅ¥Õ
µM«á¥i¥H«O¯d«e«á¨â¦æ¡A¨ä¾lÁôÂÃ
¥H§Ú¤â°Êªº¤è¦¡°µ¡A ¥ý·j´Mstep 14 ¦b¤W­±´¡¤J¤@¦C
µM«á·|¿ï¨ústep13ªº­Ë¼Æ²Ä¤G¦C¡AÀ£¦íshift¡Aend+¡ô¡A¦A©¹¤U¿ï¨ústep13ªº²Ä¤G¦C
±N¨äÁôÂà ==> ¥ç§Y«O¯dstep 13ªº²Ä¤@¦C¥H¤Î²Ä¤G¦C¡A´N¹³¬Oªþ¥óªºstep13¡B14

¨C­Ó¤å¥ó¶}©l¤£¤@©w¬Ostep13¡A¥B¨C­Óstepªº¦C¼Æ¬O¤£¤@¼Ëªº
©Ò¥H§Ú·Q¨ìªº¤è¦¡¬O¥Îendup©Î¬Oenddown¡A¦ý¬O­n§PÂ_¨C­Óstep¤¤¶¡­n¦p¦ó´¡¤J¦C¡A§Ú´N¨SÂá¤F
¦]¬°¦C¦n¹³¤£¯à³]©wÅܼơA((§Úªº¯à¤O¤£¨¬¡Aª¦¤å¦ü¥G¤]¨S¦³§ä¨ìÃþ¦üªº¤èªk))

Question.rar (698.25 KB)

©Ò¥H½Ð«e½ú­ÌÀ°¦£¡A§Æ±æ¯à°÷¬Ù¤UµL¿×ªº®É¶¡
ÁÂÁÂ

´¡¤JªÅ¥Õ¦C«á´N¤j©ó65536¦C¤F¡C§AªºOffice2003¤£¤ä«ù¡C

TOP

¦^´_ 1# a703130
  1. Sub Ex()
  2.     Dim Rng(1 To 2) As Range
  3.     With Sheets("Page1")
  4.         Set Rng(1) = .Range("a2")
  5.         Set Rng(2) = Rng(1).End(xlDown)
  6.         Do While Rng(1).Row <> Rows.Count
  7.             If .Range(Rng(1), Rng(2)).Rows.Count >= 3 Then .Range(Rng(1).Offset(1), Rng(2).Offset(-1)).EntireRow.Hidden = True
  8.             Set Rng(1) = Rng(2).End(xlDown)
  9.             Set Rng(2) = Rng(1).End(xlDown)
  10.         Loop
  11.     End With
  12. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# oobird

¤j¤j»¡ªº¤]¦³¹D²z

¦pªG¬O¦b¤£·|¶W¹Lªº±¡ªp¤U¡A¬O§_¦³¨ä¿ìªk??

TOP

¦^´_ 3# GBKEE

ÁÂÁ¤j¤j«ü¾É
¤£¹L³o¤è¦¡¦ü¥G¥u¯à«O¯d²Ä¤@¦æ&³Ì«á¤@¦æ

¨S¿ìªk«ö·Ó Step ¤è¦¡ ¥h°µ

¤£ª¾¹D¬O§_Áٻݭn­×§ï¤°»ò¦a¤è??

TOP

¦^´_ 5# a703130
  1. Sub nn()
  2. Dim A As Range, Rng As Range, Rng1 As Range, Rng2 As Range
  3. Set d = CreateObject("Scripting.Dictionary")
  4. Range("D:D").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
  5. Cells.EntireRow.Hidden = False
  6. For Each A In Range([D2], [D65536].End(xlUp))
  7. If d.exists(A.Value) = False Then
  8.    d(A.Value) = A.Value
  9.    If Rng2 Is Nothing Then Set Rng2 = A Else Set Rng2 = Union(A, Rng2)
  10. End If
  11.   If A = A.Offset(1, 0) Then
  12.      If Rng Is Nothing Then Set Rng = A Else Set Rng = Union(A, Rng)
  13.      Else
  14.      If Rng1 Is Nothing Then Set Rng1 = A.Offset(1, 0) Else Set Rng1 = Union(A.Offset(1, 0), Rng1)
  15.    End If
  16. Next
  17. Rng1.EntireRow.Insert
  18. Rng.EntireRow.Hidden = True
  19. Rng2.EntireRow.Hidden = False
  20. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 6# Hsieh

¦¹¤èªk¥i¦æ

¤£¹L³o¤èªk¦ü¥G¤w¸g¶W¹L§Ú©Òª¾¹Dªº»y¨¥

¤£ª¾¹D«e½ú¬O§_¯àÀ°¦£µù¸Ñ¡AÅý§Ú¯à°÷§ó®e©ö¾Ç²ß

ÁÂÁÂ

TOP

¦^´_ 7# a703130

³o¨ÃµL¯S®í»yªk
½Ð°w¹ï¤£¸Ñ¤§³Bµo°Ý
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_  Hsieh
¦¹¤èªk¥i¦æa703130 µoªí©ó 2011/11/2 09:26

¼Ó¥DExcelªºª©¥»¬°2003 ¨Ì§AªºªþÀÉ ¨Ó¾Þ§@ Hsieh ¶Wª©ªºµ{¦¡
Rng1.EntireRow.Insert  ³o¸Ìªºµ{¦¡½X ·|µo¥Í¿ù»~ .
¦p¦P oobird ¶Wª©»¡  ´¡¤JªÅ¥Õ¦C«á´N¤j©ó65536¦C¤F¡C§AªºOffice2003¤£¤ä«ù¡C
©Ò¥H ¼Ó¥D ¥i¯à»Ý¤É¯ÅExcelªºª©¥».

TOP

¦^´_ 3# GBKEE


¨Ì¼ÐÃD¥t½Ð±Ð¤j¤j,§Úªº°ÝÃD·Q§â­ì©l¸ê®Æ´¡¤J¾ã¦C¶i¥h
µ§¼Æ«Ü¦h»Ý­n¦A¤£¦P½s¸¹³B´¡¤J¾ã¦C¤À³Î¶}

[attach]26698[/attach]
¶}¤ß¾Ç²ß,¾Ç²ß«Ü¶}¤ß

TOP

        ÀR«ä¦Û¦b : ¥¬¬I¦p¼½ºØ¡A¥HÅw³ß¤ß´þ¼íºØ¤l¡A¤~·|µoªÞ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD