|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
参与一下。。。- Sub ykcbf() '//2024.2.17
- Dim arr, brr(1 To 10000, 1 To 13)
- Set ws = ThisWorkbook
- Set sh = ws.Sheets("汇总")
- With sh
- .UsedRange.Offset(1).Clear
- .Cells.Interior.ColorIndex = 0
- End With
- For Each sht In Sheets
- If InStr(sht.Name, "年级") Then
- With sht
- r = sh.Cells(Rows.Count, 1).End(3).Offset(1).Row
- r1 = .UsedRange.Find("合计").Row
- arr = .Range("a2:m" & r1 - 1)
- sh.Cells(r, 1).Resize(UBound(arr), UBound(arr, 2)) = arr
- If InStr(arr(1, 1), "一年") Then
- sh.Cells(r, 1).Resize(UBound(arr), UBound(arr, 2)).Interior.ColorIndex = 8
- End If
- sh.Cells(r, 1).Resize(UBound(arr), UBound(arr, 2)).Borders.LineStyle = 1
- End With
- End If
- Next
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|