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

¦p¦óÅý¬Û¦P¤º®eªºªí®æ¦X¨Ö

¦p¦óÅý¬Û¦P¤º®eªºªí®æ¦X¨Ö

½Ð°Ý«öÄæ¦ì±Æ§Ç«á¦³¬Û¦P¤º®eªºÀx¦s®æ­n¦X¨Ö¦¨1­Ó¡A
¤â°Êªº°µªk¬O±N­«½Æªº§R°£¦A¿ï¨ú¦X¨Ö¡A¥Îµ{¦¡¸Ó«ç»ò°µ©O¡H
deyan

®¼®e©ö²z¸Ñªº¥N½X
¾Ç²ß¤F
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

ÁÂÁ¡I¤èªk¸ò§Ú·Qªº«Ü¹³¡A¥u¬O§Ú¼g¤£¥X¨Ó

½Ð°Ý MYROW = Cells([B:B].Find("*", , , , , 2).Row, 1).Row

³o¦æ¤¤.Find("*", , , , , 2) ¥Nªí¤°»ò·N«ä¡H
deyan

TOP

¦^´_ 9# deyan
³o¬O317ªºµ{¦¡½X§Ú¥N¶K¤W,¼gªº«Ü¦n.
  1. Sub nn()
  2. Dim A As Range, r&
  3. Application.DisplayAlerts = False
  4. r = 3
  5. Do While Cells(r, 2) <> ""
  6.    Set A = Cells(r, 2)
  7.    Do Until Cells(r, 2) <> A
  8.    r = r + 1
  9.    Loop
  10.    Range(A, Cells(r - 1, 2)).Merge
  11. Loop
  12. Application.DisplayAlerts = True
  13. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ basarasy ©ó 2011-1-3 11:20 ½s¿è

¦^´_ 9# deyan

¸Õ¸Õ³o­Ó.
  1. Sub Macro1()

  2.   Dim MYT1, MYT2, MYT3, MYROW As Integer
  3.   
  4.    Application.DisplayAlerts = False
  5.    
  6.    MYROW = Cells([B:B].Find("*", , , , , 2).Row, 1).Row

  7.    If MYROW <= 3 Then End
  8.    
  9.    MYT1 = 3 'B3¶}©l
  10.    
  11.     Do
  12.         
  13.     MYT2 = Range("B" & MYT1)
  14.    
  15.     MYT3 = MYT1 + 1
  16.    
  17.          Do
  18.         
  19.               If MYT2 = Range("B" & MYT3) Then
  20.    
  21.                  MYT3 = MYT3 + 1
  22.    
  23.               Else
  24.    
  25.                  Range(Cells(MYT1, 2), Cells(MYT3 - 1, 2)).Merge
  26.                   MYT2 = 0
  27.    
  28.               End If
  29.                      
  30.           Loop Until MYT2 = 0
  31.      
  32.       MYT1 = MYT3
  33.       
  34.    Loop Until MYT1 > MYROW
  35.      
  36.     Columns("B:B").HorizontalAlignment = xlCenter
  37.     Application.DisplayAlerts = True
  38. End Sub
½Æ»s¥N½X
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

ÁÂÁÂ317¡A¦ý¬OÁÙ¤£¯à¤U¸ü¡A¥i¥H¶K¥N½X©Î±Hµ¹§Ú¶Ü¡H
deyan

TOP

¦^´_ 6# deyan

¸Õ¸Õ

ex2003.rar (9.45 KB)

TOP

¤w¸g¸Õ¹L¤F¡A

¦ý¬O§Ú­nªºµ²ªG¤£¬O³o¼Ë¡A

­nª½ªº¡B¤£¤@©w¥u¬O2®æ¦X¨Ö

§Ú¦A¸Õ¸Õ¬Ý¯à§_­×§ï¦¨¦Û¤v ...
deyan µoªí©ó 2011-1-2 02:34


©ÎªÌ¤W¶ÇÀɮרÓ,Åý¤j®a°Ñ¦Ò°Ñ¦Ò
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¥»©«³Ì«á¥Ñ deyan ©ó 2011-1-2 02:38 ½s¿è
¤j·§¬O³o¼Ë,a©Mb¦³¼Æ¦r,Àˬd«ámerge,¸Õ¸Õ
FAlonso µoªí©ó 2011-1-1 22:33


¤w¸g¸Õ¹L¤F¡A

¦ý¬O§Ú­nªºµ²ªG¤£¬O³o¼Ë¡A

­nª½ªº¡B¤£¤@©w¥u¬O2®æ¦X¨Ö

§Ú¦A¸Õ¸Õ¬Ý¯à§_­×§ï¦¨¦Û¤v­nªºµ²ªG¡A·PÁ¡I
deyan

TOP

¥»©«³Ì«á¥Ñ FAlonso ©ó 2011-1-1 22:38 ½s¿è
  1. Sub abc()
  2. Dim myrange As Range, mycell As Range, mytarget As Range
  3. Application.DisplayAlerts = False
  4. Set myrange = Range("A1:A" & Range("A1").End(xlDown).Row)
  5. For Each mycell In myrange
  6. If mycell = mycell.Offset(, 1) Then
  7. Set mytarget = Union(mycell, mycell.Offset(, 1))
  8. With mytarget
  9. .Merge
  10. .HorizontalAlignment = xlCenter
  11. End With
  12. End If
  13. Next
  14. Application.DisplayAlerts = True
  15. End Sub
½Æ»s¥N½X
¤j·§¬O³o¼Ë,a©Mb¦³¼Æ¦r,Àˬd«ámerge,¸Õ¸Õ
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

        ÀR«ä¦Û¦b : µÊ®ð¼L¤Ú¤£¦n¡A¤ß¦a¦A¦n¤]¤£¯àºâ¬O¦n¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD