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

¯S©wÃC¦âÀx¦s®æ±Æ§Ç°ÝÃD

¯S©wÃC¦âÀx¦s®æ±Æ§Ç°ÝÃD

¦U¦ì¤j¤j,§A¦n

§Ú³]©w¤F¤½¦¡¬O·íBÄæÀx¦s®æ¬O¦³ÃC¦â®É(¤£¬O°ò¥»ªº256¦â,¬O²Lµµ¦â),
AÄæ´N·|­«·s¥Ñ1¶}©l¥Ñ¶¶§Ç½s¸¹,¦pBÄ榳¼Ð°OÃC¦â, AÄæ´N¤£·|¦³½s¸¹

¦ý¦pªG§Ú·Q¦b¬Y¤@¦C¥[´¡¤@ºØÃC¦â°µ¼Ð°O®É(¤£¬O²Lµµ¦â),¦b°õ¦æµ{¦¡®É¤S¤£·|¥[´¡½s¸¹,½Ð°Ý§ÚÀ³«ç¼Ë¥i¥H°µ¨ì,°£¤F¯S©wÃC¦â¥~(¤£¬O°ò¥»ªº256¦â)¨ä¥L³£¥i¥H°µ¨ì¶¶§Ç©O??

ÁÂÁÂ

®w¦sªí.rar (86.05 KB)

¥»©«³Ì«á¥Ñ n7822123 ©ó 2020-7-16 02:23 ½s¿è

¦^´_ 1# mdr0465

¦pªG¤£¬O¬Ý¤Fªþ¥ó¡A¥u³æ¯Â¬Ý§Aªº¤å¦r±Ô­zªº¸Ü¡AÁÙ¯uªº¬O ¬Ý¤£¤ÓÀ´!

³o¼Ë§a¡A§Ú¾ã²z¤F¤@¤U§Aªº»Ý¨D¡A§A¦A¬Ý¬Ý¬O¤£¬O§A­nªº

1.·íBÄ榳¸ê®Æ®É¡AAÄæ­nµ¹½s¸¹¡A¥B±q1¶}©l¡AµL¸ê®Æ«h¸õ¹L¤£µ¹½s¸¹

2.·íBÄ榳¸ê®Æ®É¡A¦ý¬OBÄ榳ÃC¦â (¤£¬OµL¦â¡A¤]¤£¬O²Hµµ¦â)¡A«hAÄ椣µ¹½s¸¹

3.BÄæ«e11½X­Y¤@¼Ë¡A«hAÄæ½s¸¹¤@¼Ë¡A¥B­n¦X¨ÖÀx¦s®æ?

4.BÄæ¹J¨ì²Lµµ¦â(¥u»{²Lµµ¦â)¡AAÄæ½s¸¹­«¸m¡A¤U¦¸¦A±q1¶}©l


µ{¦¡¦p¤U

Sub Test()  
Dim Arr, Brr As Range, R&, Idx&
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set Brr = Range([A4], Cells(Rows.Count, 2).End(3))
With Brr.Resize(, 1)
   .UnMerge: .Borders.LineStyle = 1
   .ClearContents: .HorizontalAlignment = 3
End With
Arr = Brr
For R = 2 To UBound(Arr)
  If Arr(R, 2) <> "" And Brr(R, 2).Interior.ColorIndex = xlNone Then
    If Left(Arr(R, 2), 11) <> Left(Arr(R - 1, 2), 11) Then
      Idx = Idx + 1: Arr(R, 1) = Idx
    Else  '¦X¨ÖÀx¦s®æ
      Range(Brr(R, 1), Brr(R - 1, 1)).Merge
    End If
  End If
  If Brr(R, 2).Interior.Color = RGB(217, 226, 243) Then Idx = 0
Next R
Brr = Arr
End Sub


Àɮצp¤U

®w¦sªí.rar (116.62 KB)
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 2# n7822123 [/b
§A¦n
ÁÂÁ«ü±Ð¡A¦ý§Ú°õ¦æµ{¦¡®É³£¦b²Lµµ¦â¬O¨S¦³­«·s¥Ñ¤@¶}©l±Æ§Ç¡A½Ð½ç±Ð¡AÁÂÁÂ

TOP

¦^´_ 2# n7822123

¦¨¥\¤F¡AÁÂÁ§A

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2020-7-16 16:23 ½s¿è

¦³ÂI¶, ¸Õ¸Õ~~

Sub Test2()
Dim R&, xR As Range, xH As Range, xE As Range, T1$, T2$, N&
Application.ScreenUpdating = False
With [A:A]: .UnMerge: .ClearContents: .HorizontalAlignment = 3: End With
R = [B65536].End(xlUp).Row
For Each xR In Range("B5:B" & R)
    If xR.Interior.ColorIndex = 24 Then N = 0:  GoTo 101
    T1 = Left(xR, 11): If T1 = "" Then GoTo 101
    If T2 <> "" And T1 <> T2 Then Range(xH, xE).Merge: T2 = ""
    If T1 <> T2 Then Set xH = xR(1, 0): N = N + 1: xH = N:  T2 = T1
    If T1 = T2 Then Set xE = xR(1, 0)
    If xR.Row = R Then Range(xH, xE).Merge
101: Next
Range([A5], xE).Borders.LineStyle = 1
End Sub


=============================

TOP

¦^´_ 5# ­ã´£³¡ªL

ª©¥D¡AÁÂÁ§A§A¦A¤@¦¸¥X¤âÀ°§U
¸U¤À·P¿E
ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : §ïÅܦۤv¬O¦Û±Ï¡A¼vÅT§O¤H¬O±Ï¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD