Stats

Popular Posts

Followers

Ptt:Excel不同組合對應數字加總

養花種魚數月亮賞星星 於 Friday, May 29, 2009 7:50 PM 發表




提供一個很蠢的方法~

先定義名稱 B1 牛肉;B2 羊肉....以此類推
Sub ptt()
Dim MyName As Name
i = 10
For i = 1 To 8
Cells(i, 2).Name = Cells(i, 1).Value
Next
End Sub

E1=INDIRECT(E1)+INDIRECT(F1)+INDIRECT(Sheet1!G1)

這樣就可以計算出A餐的價格~

用這個方法的好處是對一個Excel笨蛋來說也會計算
E1=牛肉+紅茶+蛋糕

Tags: , ,

讀者回應 ( 0 意見 )

Post a Comment

Please leave your name and tell me what you thought about this site. Comments, suggestions and views are welcomed.

如果這篇文章對你有幫助,那請留個訊息給我~