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

«æ!!! "µLªk³]©wºØÃþBorderªºLineStyleÄÝ©Ê"

¥»©«³Ì«á¥Ñ s13030029 ©ó 2020-6-9 08:35 ½s¿è

¦^´_ 2# ­ã´£³¡ªL
¦]¬°³o¼ËÁÙ¤£¬O§Ú³Ì²×ªºªí®æ
¹ê»Ú¤W°µ§¹·|¦³¼ÐÃD¦C(¦p¹Ï1¡B2)
©Ò¥H­ã¤jªºµ{¦¡½X¥i¯àÁÙ­n¦b­×§ï¤@¤U
¤]¥i¥HÀ°§Ú¬Ý¬Ý§Úªºµ{¦¡½X¯à¤£¯à²µu¤@ÂI
ÁÂÁÂ




ªþÀɦ³§¹¾ãµ{¦¡½X
°ÝÃD.rar (33.96 KB)

TOP

¥»©«³Ì«á¥Ñ s13030029 ©ó 2020-6-9 08:20 ½s¿è

¦^´_ 2# ­ã´£³¡ªL
­ã¤j
§A¬OÀ°§Ú²¤Æµ{¦¡½X¤F¶ÜXD
T1 = Split(xR(1, 4) & "-", "-")(0)
¥i¥H»¡©ú¤@¤U³o¥y¬O«ç»ò¥Îªº¶Ü?

TOP

Sub ¦X¨Ö()
Dim R&, xR As Range, T1$, T2$, TC$, xH As Range, K
R = [D65536].End(xlUp).Row
With Range("A12:M" & R)
     .UnMerge
     .Borders.LineStyle = xlNone
End With
Application.DisplayAlerts = False
For Each xR In Range("A12:A" & R)
    T1 = Split(xR(1, 4) & "-", "-")(0)
    If T1 <> TC Then TC = T1: Set xH = xR
    T2 = Split(xR(2, 4) & "-", "-")(0)
    If T2 <> TC Then
       For Each K In Array(1, 2, 3, 13)
           Range(xR(1, K), xH(1, K)).Merge
       Next K
    End If
Next
Range("A12:M" & R).Borders.LineStyle = 1
End Sub

TOP

        ÀR«ä¦Û¦b : ¤£­nÀH¤ß©Ò±ý¡A­nÀH¤ß±Ð¨|¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD