- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 255
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-25
|
¦^´_ 14# PJChen
µ{¦¡½X³£¦³µù¸Ñ¡A½Ð¤F¸Ñµ{¦¡½X´N¯à¦Û¦æ§ó§ï- Sub Ex()
- Dim A As Range
- fs = ThisWorkbook.Sheets("VBA").[A2] 'A2¬°ÀɦW
- With Workbooks(fs)
- .Sheets("³øªí").UsedRange = .Sheets("³øªí").UsedRange.Value
- .Sheets("³øªí").Copy '§â³øªí½Æ»s¨ì·sÀÉ®×
- .Close 0 'Ãö³¬a.xlsx
- End With
- Application.DisplayAlerts = False 'Ãö³¬¹ï¸Ü¤è¶ô
- ActiveWorkbook.SaveAs "D:\©â¤ô¾÷¼Æ¾Ú¤ÀªR_È.xlsx" '±N·sÀÉÀx¦s
- With Workbooks("©â¤ô¾÷¼Æ¾Ú¤ÀªR_È.xlsx") '³øªí·sÀÉ®×
- With .Sheets("³øªí")
- .UsedRange = .UsedRange.Value '¥h°£¤½¦¡
- .Range("A1").CurrentRegion.Subtotal GroupBy:=4, Function:=xlSum, TotalList:=Array(10, 11), _
- Replace:=True, PageBreaks:=False, SummaryBelowData:=True '¤w³sÄò¤é´Á¤À²Õ¤pp
- .[A:D].Delete '§R°£A:DÄæ¦ì
- If .[B3] = "" Then .Rows(3).Delete
- With .Range("F:F").SpecialCells(xlCellTypeFormulas)
- .Offset(, -1) = "p"
- For Each A In .Cells 'µe®Ø½u
- A = Round(A, 3) '¥|±Ë¤¤J¤p¼ÆÂI3¦ì
- A.Offset(, 1) = Round(A.Offset(, 1), 3) '¥|±Ë¤¤J¤p¼ÆÂI3¦ì
- For i = 7 To 10
- A.Offset(, -1).Resize(, 3).Borders(i).Weight = xlThick '®Ø½u¼e«×
- A.Offset(, -1).Resize(, 3).Borders(i).ColorIndex = 3 '®Ø½uÃC¦â
- Next
- Next
- End With
- For i = 1 To .Cells(.Rows.Count, "E").End(xlUp).CurrentRegion.Rows.Count 'Á`pªí®æµe®Ø½u
- For j = 7 To 10
- With .Cells(.Rows.Count, "E").End(xlUp).CurrentRegion.Rows(i).Borders(j)
- .Weight = xlThick
- .ColorIndex = 3
- End With
- Next
- Next
- End With
- .Save
- End With
- Application.DisplayAlerts = True
- End Sub
½Æ»s¥N½X |
|