- 帖子
- 2035
- 主題
- 24
- 精華
- 0
- 積分
- 2031
- 點名
- 0
- 作業系統
- Win7
- 軟體版本
- Office2010
- 閱讀權限
- 100
- 性別
- 男
- 註冊時間
- 2012-3-22
- 最後登錄
- 2024-2-1
|
3#
發表於 2012-7-29 16:13
| 只看該作者
回復 2# freeffly
請參考以下之程式碼:- Sub Test()
- Dim seasonLineAvg, SeasonLineStDevP As Double
-
- ' =AVERAGE(E2:E62)
- ' =I2+2*STDEVP(E2:E62)
- seasonLineAvg = Application.Average(Range("E2:E62"))
- Sheets("GoldPassbook").Range("I2504").Value = seasonLineAvg
- SeasonLineStDevP = seasonLineAvg + 2 * Application.StDevP(Range("E2:E62"))
- Sheets("GoldPassbook").Range("H2504").Value = SeasonLineStDevP
-
- ' =AVERAGE(E2500:E2560)
- ' =I2500+2*STDEVP(E2500:E2560)
- seasonLineAvg = Application.Average(Range("E2500:E2560"))
- Sheets("GoldPassbook").Range("I2505").Value = seasonLineAvg
- SeasonLineStDevP = seasonLineAvg + 2 * Application.StDevP(Range("E2500:E2560"))
- Sheets("GoldPassbook").Range("H2505").Value = SeasonLineStDevP
- End Sub
複製代碼 |
|