- ©«¤l
- 33
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 37
- ÂI¦W
- 0
- §@·~¨t²Î
- w7
- ³nÅ骩¥»
- pro
- ¾\ŪÅv
- 10
- ©Ê§O
- ¤k
- ¨Ó¦Û
- ¥x¤¤
- µù¥U®É¶¡
- 2012-6-20
- ³Ì«áµn¿ý
- 2019-5-24
|
[code][/code]¦^´_ 5# GBKEE
¹ï¤£°_n¤W¶ÇÀɮ׮ɥX²{: ¤£¤ä«ù¤W¶Ç¦¹ÃþÂX®i¦Wªºªþ¥ó, ¥u¦nªþ¤Wµ{¦¡
Option Explicit
Sub °õ¦æ¤ÀªRµ²ªG()
Dim oi As Integer '³]outlinep¼Æ¾¹
Dim oj As Integer 'pºâ"NG"ªº®a¼Æ
Dim ei As Integer ' §äE178Ȫºp¼Æ¾¹
Dim wr, xlRow As Integer '³]©wCOPY¤u§@ªí¼Æ¥Øp¼Æ¾¹
Dim an As Integer 'outline ¤ÀªR¦¸¼Æ .¨ÃÅã¥Ü¦b¼ÐÃD¦C(b4)
'³]©w¨C¤@Ó¤u§@ªí¨C¤@¦³¤½¦¡ªºÀx¦s®æ,¶¶§Ç±q(²Ä1 Ó¤¸¯À)¶}©l
an = 1 ' ¶}©loutline ¤ÀªR¦¸¼Æ .
For wr = 4 To Worksheets.Count
With Worksheets(wr)
xlRow = .Range("B" & .Rows.Count).End(xlUp).Row
'"A3"Àx¦s®æ NO.OF.RESULTÈ
.Range("A3").Formula = "=COUNT(B6:B" & xlRow & ")"
'"B3"Àx¦s®æ¤ÀªRȤ¤¶¡È(MEDIAN)
.Range("B3").Formula = "=MEDIAN(B6:B" & xlRow & ")"
'C3Àx¦s®æIRQ´Ó
.Range("C3").Formula = "=(QUARTILE(B6:B" & xlRow & ",3) -QUARTILE(B6:B" & xlRow & ",1))*0.7413"
'"E3"Àx¦s®æROBUS CVÈ
.Range("E3").Formula = "= C3 / B3 *100"
'©w¸q"j3"Àx¦s®æ¬°¤ÀªRÈ¥§¡È
.Range("J3").Formula = "=AVERAGE(B6:B" & xlRow & ")"
'"F3"Àx¦s®æ¤ÀªRȤ¤³Ì¤ÖÈ
.Range("F3").Formula = "=MIN(B6:B" & xlRow & ")"
'"G3"Àx¦s®æ¤ÀªRȤ¤³Ì¤jÈ
.Range("G3").Formula = "=MAX(B6:B" & xlRow & ")"
'"H3"Àx¦s®æRANGEÈ
.Range("H3").Formula = "=G3-F3"
'©w¸q"k3"Àx¦s®æ¬°stdv
.Range("k3").Formula = "=STDEV(B6:B" & xlRow & ")"
.Range("B4").Value = an
'"C"Äæ Z-SCORE È
.Range("C6:C" & xlRow & "").Formula = "=(B6-$B$3)/$C$3"
' "D"ÄæOUTLINEÈ
.Range("D6:D" & xlRow & "").Formula = "=(B6- $J$3)/$K$3"
.Range("I3").Value = E178(.Range("A3").Value)
End With
'Worksheets(wr).Range("I3")©w¸qE178ȦbI3Àx¦s®æ
'For ei = 1 To 102
'If Worksheets(2).Cells(ei, 1).Value = Worksheets(wr).Range("A3").Value Then
'Worksheets(wr).Range("I3").Value = Worksheets(2).Cells(ei, 2).Value
'Exit For
'End If
'Next ei
'"E'Äæ§P§OOUTLINE,true="ok"FALSE="NG"
Worksheets(wr).Range("L3").Value = 0 '"NG"®a¼Æ°_©lÈ
For oi = 6 To Worksheets(wr).Range("A3").Value + 5 '¶}©l§P§O±q²Ä6¦C¶}©l
'¤ñ¹ïD6¬O§_< E178È(I3)Äæ
If Worksheets(wr).Range("D" & oi).Value < Worksheets(wr).Range("I3").Value Then
'È=TRUE®ÉEÄæ°O¿ý""OK"
Worksheets(wr).Range("E" & oi).Value = "OK"
Else
With Worksheets(wr)
'È= FLACE®ÉEÄæ°O¿ý"NG"
.Range("E" & oi).Value = "NG"
'³]"NG"FONT.COLOR¬°¬õ¦â
.Range("E" & oi).Font.Color = vbRed
'"NG"®a¼Æ+1
.Range("L3").Value = .Range("L3").Value + 1
End With
End If
Next oi
Next wr
End Sub
Public Function E178(TN As Integer) As Double
Dim ei As Integer
ei = 1
For ei = 1 To TN
If Worksheets(2).Cells(ei, 1).Value = TN Then
E178 = Worksheets(2).Cells(ei, 2).Value
End If
Next ei
End Function |
|