- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 11# acdx - Option Explicit
- Private Sub format()
- Dim ws As Worksheet, sName As String, AR(1 To 2), I As Integer
- sName = "PTAVS"
- On Error Resume Next
- Set ws = Sheets(sName)
- If ws Is Nothing Then
- Worksheets.Add after:=Worksheets(Worksheets.Count)
- Worksheets(Worksheets.Count).Name = sName
- Set ws = Sheets(sName)
- Else
- MsgBox sName & "¤u§@ªí¤w¦s¦b¡C"
- Sheets("Result").Select
- Exit Sub
- End If
- With ws.Cells
- .HorizontalAlignment = xlCenter
- .VerticalAlignment = xlCenter
- .Orientation = 0
- .AddIndent = False
- .IndentLevel = 0
- .ShrinkToFit = False
- .ReadingOrder = xlContext
- .MergeCells = False
- With .Font
- .Name = "Arial"
- .Size = 10
- .Strikethrough = False
- .Superscript = False
- .Subscript = False
- .OutlineFont = False
- .Shadow = False
- .Underline = xlUnderlineStyleNone
- .ColorIndex = xlAutomatic
- .TintAndShade = 0
- '.ThemeFont = xlThemeFontNone '2003¨S³o°Ñ¼Æ
- End With
- .Range("B1:M1").Merge
- AR(1) = Array("A1:A4", "B2:G2", "B3:D3", "E3:G3", "B4:G4")
- AR(2) = Array("C1~C5", "(sone)", "H", "M", "")
- For I = 0 To UBound(AR(1))
- With .Range(AR(1)(I))
- .WrapText = False
- .MergeCells = IIf(I < UBound(AR(1)), True, False)
- .Value = AR(2)(I)
- End With
- Next
- .Range("B4:D4").Value = Array("mean", "standard deviation", "mean+CV*stdev")
- .Range("B4:D4").Copy .Range("E4")
- .Range("B2:G4").Copy .Range("H2")
- .Range("H2").Value = "(tu)"
- With .Range("A1:M4")
- For I = 5 To 12 'µe®Ø½u
- With .Borders(I)
- .LineStyle = IIf(I >= 7, xlContinuous, xlNone)
- If I >= 7 Then .ColorIndex = 0
- 'If I >= 7 Then .TintAndShade = 0 '2003®Ø½u¨S³oÄÝ©Ê
- If I >= 7 Then .Weight = xlThin
- End With
- Next
- .Font.Name = "Arial"
- .Font.Size = 10
- End With
- End With
- Sheets("Result").Select
- End Sub
½Æ»s¥N½X |
|