- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 17# lamihsuen - ' ±N³Ì«á¤@¦¸²Ä¤@¦C(¤½¦¡)¼ÐÃD¦C¼ÐÃD»P²Ä¤G¦C¤½¦¡È copy ¦Ü ZSCORE ªí®æ²Ä¤@¦C»P²Ä¤G¦C
- z_oi = angin_sr
- z_ai = z_sr
- z_aj = 1
- For z_oj = 1 To 12
- .Cells(z_ai - 4, z_aj).Value = .Cells(z_oi - 4, z_oj).Value
- .Cells(z_ai - 3, z_aj).Value = .Cells(z_oi - 3, z_oj).Value
- z_aj = z_aj + 1
- Next z_oj
- ' ©w¸q²Ä¥|¦Cªí®æ¼ÐÃD¦C
- xlRow = .Range("B" & z_sr).End(xlDown).Row
- .Cells((z_sr - 1), 1).Value = .Cells((sr - 1), 1).Value
- .Cells((z_sr - 1), 2).Value = .Cells((sr - 1), 2).Value
- .Cells((z_sr - 1), 3).Value = .Cells((sr - 1), 3).Value
- .Cells((z_sr - 1), 4).Value = "§P§Oµ²ªG"
- .Cells((z_sr - 1), 5).Value = "¤ÀªR¤èªk"
- .Cells((z_sr - 1), 6).Value = "¨Ï¥Î»ö¾¹"
-
- ' ¥»¦¸ "C" Äæ Z-SCORE Èpºâ
- ' .Range("C" & z_sr & " :C" & xlRow).Formula = "=(b" & z_sr & "-$B$" & z_sr - 3 & ") /$C$" & z_sr - 3
- ' .Range("D" & z_sr & " :D" & xlRow).Formula = "=IF(C" & z_sr & ">=3,""²§±`"",IF( C" & z_sr & "<=2,""ok"",""¦³½èºÃ""))"
-
- ' 2012/7/20 ·s¼W¦C
- ' §P§O¥»¦¸ "C" Äæ Z-SCORE ȦpªG¬O outline «h z ÈÅã¥Ü "*"
- ' ³]©w mue_sr, mue_oi ¬° z ÈÄæ¦ìp¼Æ¾¹
- mue_sr = z_sr
- mue_oi = angin_sr
- For mue_sr = mue_sr To xlRow
- If .Cells(mue_sr, 1) = .Cells(mue_oi, 1) Then
- .Cells(mue_sr, 3).Formula = "=(b" & mue_sr & "-$B$" & z_sr - 3 & ") /$C$" & z_sr - 3
- If .Cells(mue_sr, 3).Value > 3 Or .Cells(mue_sr, 3).Value <= -3 Then
- .Cells(mue_sr, 3).Font.Color = RGB(255, 0, 255)
- End If
- mue_oi = mue_oi + 1
- Else
- .Cells(mue_sr, 3).Value = "*"
- .Cells(mue_sr, 3).Interior.Color = RGB(255, 0, 0)
- .Cells(mue_sr, 3).HorizontalAlignment = xlHAlignCenter
- End If
- Next mue_sr
- ' ©w¸q z ȧP§Oµ²ªG¨ÃÅã¥Ü (D) Äæ,"(Z) È <= 2 ¬° "OK" Åã¥Üºñ¦â","2<(Z) È <3 ¬° "¦³½èºÃ" Åã¥Ü¶À¦â,(Z)È >3 ¬° "²§±`" Åã¥Ü¬õ¦â
- End With
-
- ' ø»s²Îp¤ÀªR¹Ïªí
- Call DrawStatistics(wr)
- Next wr
- End Sub
-
- Sub DrawStatistics(ct As Integer)
- Dim tbl As String
- Dim totalRow As Long
- Dim StartKBarRow, EndKBarRow As Long
- StartKBarRow = 6
- With Worksheets(ct)
- tbl = .Name
- EndKBarRow = .Range("A1").CurrentRegion.Rows.Count
- Set Chart_Source = Range(tbl & "!$C$" & CStr(StartKBarRow) & ":" & tbl & "!$C$" & CStr(EndKBarRow))
-
- ' sPos(1) = CInt(Mid("205*090*090*100*132*096*132*090*173*090*314*090", (ct - 4) * 4 + 1, 3)) ' ¹Ï¼Ð®y¼Ð(¦C)
- ' ¬°¦Ò¶q¦b¹ê°È¹B¥Î¤W¡A¨C±iªí³æ¤º§t¸ê®Æ¤º®e¤§¦h¹è¤£¤@¡A¥i¯à¹ê»Ú¨Ï¥Î¦C¼Æ®É¦³¼W´î¡A¬G§ï¥H°ÊºA³B²z¡C
- sPos(1) = .UsedRange.Rows.Count
- While IsEmpty(.Cells(sPos(1), 3).Value) And sPos(1) > 6 ' ©|¶·¦A¦¸¹LÂo³¡¤ÀªÅ¥Õ»P«D¯u¹ê¶×¤J¸ê®Æªº°ÝÃD¦C
- sPos(1) = sPos(1) - 1
- Wend
- sPos(1) = sPos(1) + 5
-
- sPos(2) = CInt(Mid("001*001*001*001*001*001*001*001*001*001*001*001", (ct - 4) * 4 + 1, 3)) ' ¹Ï¼Ð®y¼Ð(Äæ)
- sPos(3) = CInt(Mid("900*900*900*900*900*900*900*900*900*900*900*900", (ct - 4) * 4 + 1, 3)) ' ¹Ïªí¼e«×
- sPos(4) = CInt(Mid("320*320*320*320*320*320*320*320*320*320*320*320", (ct - 4) * 4 + 1, 3)) ' ¹Ïªí°ª«×
- xText = UCase(tbl) & " : Z - Score"
- »s¹Ïµ{§Ç xlSh:=tbl
- End With
- End Sub
- Private Sub »s¹Ïµ{§Ç(xlSh As String) ' ¥þ³¡«Ã¸
- Dim Sh As Worksheet, xi As Integer
-
- Set Sh = Sheets(xlSh)
- Sh.ChartObjects.Delete
- With Sh.ChartObjects.Add(Sh.Cells(sPos(1), sPos(2)).Left, Sh.Cells(sPos(1), sPos(2)).Top, sPos(3), sPos(4)).Chart
- .ChartType = xlColumnClustered ' xlColumnStacked -> °ïÅ|ª½±ø¹Ï
- .SetSourceData Source:=Chart_Source
- .HasLegend = 0 ' ¹Ïªíªº¹Ï¨Ò: ¤£¥i¨£
- .SeriesCollection(1).AxisGroup = 1
-
- With .Axes(xlCategory) ' X®y¼Ð¶b
- .CategoryType = xlCategoryScale
- ' .TickLabels.NumberFormatLocal = "hh:mm"
- .MajorTickMark = xlNone
- .Border.Weight = xlHairline
- .Border.LineStyle = xlNone
- .TickLabelPosition = xlLow
- .TickLabels.Font.Size = 10
- End With
-
- '*******************************************************************
-
- With .SeriesCollection(1)
- .Shadow = False ' ¹Ïªí¤¤ªº¼Æ¦C(1)
- .InvertIfNegative = True
- ' .InvertColor = RGB(255, 124, 128) ' ·íªí¦C¼ÆȬ°tȮɡA±N¨äÅã¥Ü¤§ÃC¦â§óÅܦ¨²L¤ÑÂŦâ
- .InvertColor = RGB(32, 178, 208) ' ·íªí¦C¼ÆȬ°tȮɡA±N¨äÅã¥Ü¤§ÃC¦â§óÅܦ¨«CÂŦâ
-
- With .Format.Fill
- .Visible = msoTrue
- ' .ForeColor.RGB = RGB(149, 179, 215) ' ·íªí¦C¼ÆȬ°¥¿È®É¡AÅã¥Ü¤§ÃC¦â¬°¾ï¬õ¦â
- .ForeColor.RGB = RGB(255, 69, 0) ' ·íªí¦C¼ÆȬ°¥¿È®É¡AÅã¥Ü¤§ÃC¦â¬°¯»¬õ¦â
- .Transparency = 0
- .Solid
- End With
-
- With .Border
- .Weight = xlHairline
- .LineStyle = xlNone
- End With
-
- .HasDataLabels = True
- .DataLabels.NumberFormat = "##.##"
- .DataLabels.Position = xlLabelPositionOutsideEnd
- ' With .Interior
- ' .ColorIndex = 5
- ' .PatternColorIndex = 42
- ' .Pattern = xlSolid
- ' End With
- End With
-
- ' *******************************************************************
-
- With .Axes(xlValue).TickLabels.Font ' Y®y¼Ð¶b¤W¨è«×ªº¨è«×¼ÐÅÒªº¦rÅé
- .FontStyle = "¼Ð·Ç"
- .Size = 10
- End With
-
- With .Axes(xlValue)
- .MajorUnit = 2 ' ¹Ïªí¥ª°¼¼Æ¦C¤§¶¡¶Zȳ]©w
- ' .MaximumScale = 30
- ' .MinimumScale = -40
- End With
-
- .HasTitle = True ' ¹Ïªíªº¼ÐÃD ¥i¨£
-
- With .ChartTitle ' ¹Ïªíªº¼ÐÃD
- .Top = 1
- .Text = xText
- .Font.Size = 16
- End With
- With .PlotArea ' ¹ÏªíªºÃ¸¹Ï°Ï
- .Top = 16
- .Left = 1
- .Width = sPos(3)
- .Height = sPos(4)
- .Interior.ColorIndex = xlNone
- End With
- End With
- End Sub
½Æ»s¥N½X |
|