- ©«¤l
- 132
- ¥DÃD
- 56
- ºëµØ
- 0
- ¿n¤À
- 190
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 365
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-5-17
- ³Ì«áµn¿ý
- 2025-4-8
|
¦^´_ 2# GBKEE
§Ú¤]¦³¤@¬q¥¨¶°¸Ó¦p²¤Æ?
Private Sub format()
Dim ws As Worksheet
Dim sName As String
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
ws.Activate
Else
MsgBox sName & "¤u§@ªí¤w¦s¦b¡C"
Sheets("Result").Select
Exit Sub
End If
Cells.Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection.Font
.Name = "Arial"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
Range("B1:M1").Merge
Range("A1:A4").Select
With Selection
.WrapText = False
.MergeCells = True
.Value = "C1~C5"
End With
Range("B2:G2").Select
With Selection
.WrapText = False
.MergeCells = True
.Value = "(sone)"
End With
Range("B3:D3").Select
With Selection
.WrapText = False
.MergeCells = True
.Value = "H"
End With
Range("E3:G3").Select
With Selection
.WrapText = False
.MergeCells = True
.Value = "M"
End With
Range("B4:G4").Select
With Selection
.WrapText = True
.MergeCells = False
End With
Range("B4").Value = "mean"
Range("C4").Value = "standard deviation"
Range("D4").Value = "mean+CV*stdev"
Range("B4:D4").Copy
Range("E4").Select
ActiveSheet.Paste
Range("B2:G4").Copy
Range("H2").Select
ActiveSheet.Paste
Range("H2").Value = "(tu)"
Range("A1:M4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Font
.Name = "Arial"
.Size = 10
End With
Sheets("Result").Select
End Sub
'-------------------------------------
³o¬qcode¦³«Ü¤jªº³¡¤À¬O¦b°µÀx¦s®æªº¦X¨Ö¥H¤Îµe®Ø½u ³o¸Ó¦p¦ó²¤Æ©O? |
|