- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-12-5
|
¥»©«³Ì«á¥Ñ Andy2483 ©ó 2024-1-30 08:58 ½s¿è
¦^´_ 16# jdg188
ÁÂÁ«e½ú¦^´_,±z´£¨Ñ½d¨Ò¬O½m²ßVBA¦r¨åªº¦nÃD§÷
«á¾Ç¾Ç²ß¤è®×¦p¤U,½Ð«e½ú«ü±Ð PS:³o 31 ¸¹´¿¸g³sÄò50¦¸¤£¶}¥X
¤µ±m_20240125.zip (113.56 KB)
°õ¦æµ²ªG:
Sub ¶}¥X¦¸¼Æ²Îp3()
Dim Crr(1 To 6, 1 To 100), i%, j%, V%, xR As Range, D As Date, y%, ii%, S&, Z, T$, TT, M%
If UBound(Brr) < 100 Then Exit Sub
Set Z = CreateObject("Scripting.Dictionary")
Worksheets.Add after:=Worksheets(Sheets.Count): ActiveSheet.Name = "¶}¥X¦¸¼Æ3"
Cells.Font.Name = "·L³n¥¿¶ÂÅé": Cells.HorizontalAlignment = xlCenter: Set xR = [C1]
For i = UBound(Brr) To 100 Step -1
With xR.Resize(6, UBound(Crr, 2))
Range(.Rows(1), .Rows(1).Offset(, -2)).Borders.LineStyle = xlContinuous
Range(.Rows(1), .Rows(1).Offset(, -2)).Interior.ColorIndex = 19
For ii = 7 To 10: Range(.Cells, .Offset(, -2)).Borders(ii).Weight = 4: Next
Intersect(.Columns(1), .Columns(1).Offset(1)).Interior.ColorIndex = i Mod 15 + 33
End With
D = Brr(i, 2) + 1: S = Brr(i, 1) + 1
For j = 1 To 6
TT = T & "/": T = ""
For V = 1 To 100
Crr(1, V) = V - 1
For y = 2 To 6
If V = 1 Then T = T & "/" & Brr(i - V + 1, y + 1)
If Z(Val(Brr(i - V + 1, y + 1))) = 0 Then
Crr(y, V) = Brr(i - V + 1, y + 1)
Z(Val(Brr(i - V + 1, y + 1))) = 1
If InStr(TT, "/" & Val(Brr(i - V + 1, y + 1)) & "/") Then
xR(y, V).Interior.ColorIndex = 5: xR(y, V).Font.ColorIndex = 2
If M < V Then M = V
End If
End If
Next
Next
Next
With xR.Resize(6, UBound(Crr, 2)): .Value = Crr: xR(1, -1) = "´Á¼Æ (¤é´Á)": End With
xR(2, -1).Resize(5).Merge: xR(2, -1) = S & " (" & D & ")": xR(2, -1).Font.Bold = True
xR(2, -1).Resize(5).Interior.ColorIndex = IIf(i = UBound(Brr), 38, 40)
Set xR = xR(7, 1): Z.RemoveAll: Erase Crr
Next
ActiveSheet.UsedRange.EntireColumn.AutoFit: [B:B].ColumnWidth = 2
ActiveSheet.UsedRange.Offset(, M + 2).EntireColumn.Delete
ActiveSheet.UsedRange.Borders(10).Weight = 4: ActiveWindow.Zoom = 85
ActiveSheet.UsedRange.Offset([C65536].End(3).Row).EntireRow.Delete
End Sub |
-
-
¬¡¶Ã¯2.zip
(6.1 KB)
³o¬O¶Ç¿ùªº½d¨Ò
|