阿鳥論壇
Would you like to react to this message? Create an account in a few clicks or log in to continue.

18如何以excel模組巨集應用作公式?

向下

18如何以excel模組巨集應用作公式? Empty 18如何以excel模組巨集應用作公式?

發表  Admin 周四 11月 17, 2011 11:00 am

1工具/巨集/visual basic編輯器
2插入/模組
3輸入Function taxrate(所得)
If 所得 <= 60000 Then taxrate = 0.05 Else taxrate = 0.08
End Function
4按Alt+F11鍵切回excel
5在excel狀態列輸入=taxrate(B2)*B2
6在excel中欄位 B1輸入所得 C1輸入所得稅 B2輸入28500 C2得到1425值
7B3輸入10000 C3用拖曳下拉得到500以下同樣做法

Laughing
Admin
Admin
Admin

文章數 : 130
注冊日期 : 2011-11-15

https://birdfly.666forum.com

回頂端 向下

回頂端


 
這個論壇的權限:
無法 在這個版面回復文章