返回列表 上一主題 發帖

[分享] (分享)excel的標準差公式應用

回復 2# freeffly
請參考以下之程式碼:
  1. Sub Test()
  2.     Dim seasonLineAvg, SeasonLineStDevP As Double
  3.    
  4.     ' =AVERAGE(E2:E62)
  5.     ' =I2+2*STDEVP(E2:E62)
  6.     seasonLineAvg = Application.Average(Range("E2:E62"))
  7.     Sheets("GoldPassbook").Range("I2504").Value = seasonLineAvg
  8.     SeasonLineStDevP = seasonLineAvg + 2 * Application.StDevP(Range("E2:E62"))
  9.     Sheets("GoldPassbook").Range("H2504").Value = SeasonLineStDevP
  10.    
  11.     ' =AVERAGE(E2500:E2560)
  12.     ' =I2500+2*STDEVP(E2500:E2560)
  13.     seasonLineAvg = Application.Average(Range("E2500:E2560"))
  14.     Sheets("GoldPassbook").Range("I2505").Value = seasonLineAvg
  15.     SeasonLineStDevP = seasonLineAvg + 2 * Application.StDevP(Range("E2500:E2560"))
  16.     Sheets("GoldPassbook").Range("H2505").Value = SeasonLineStDevP
  17. End Sub
複製代碼

TOP

        靜思自在 : 做好事不能少我一人,做壞事不能多我一人。
返回列表 上一主題