Last active
October 25, 2018 13:48
-
-
Save yuyueugene84/f419bc3d4ff74744ea2ef668a38e3b55 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 算出第四行開始到最後一行的3日移動平均 | |
for i in range(4, 176): | |
# 用 format 輸入算出當日前兩天為起點、與當日為結束點的範圍至 Average() 函數内 | |
formula = "=Average(B{}:B{})".format(i-2, i) | |
# 最後將公式賦值給同一行 D 欄的儲存格 | |
tsmc_sheet.cells(i, 4).formula = formula |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment