EXCEL 公式運算

2015-05-29 8:34 am
C31=33
D31=32
E31=20
F31=16
G31=14
H31=16
I31=7
J31=1
K31=0
L31=總數=139

C32=23.7
D32=23.0
E32=14.4
F32=11.5
G32=10.1
H32=11.5
I32=5.0
J32=0.7
K32=0
L32=100%

怎樣可以解決C32+D32+E32+F32+G32+H32+I32+J32+K32+L32=99.9%,怎樣可以解決C32+D32+E32+F32+G32+H32+I32+J32+K32+L32=100.0%

以下公式只去到H,餘下I,J,K,怎樣設定公式運算,請教教。謝!

=ROUND(C25/$G$5,3)+IF(ABS(ROUND(C25/$G$5,3)-C25/$G$5)=MAX(ABS(ROUND($C25/$G$5,3)-$C25/$G$5),ABS(ROUND($D25/$G$5,3)-$D25/$G$5),ABS(ROUND($E25/$G$5,3)-$E25/$G$5),ABS(ROUND($F25/$G$5,3)-$F25/$G$5),ABS(ROUND($G25/$G$5,3)- $G25/$G$5),ABS(ROUND($H25/$G$5,3)-$H25/$G$5)),SUM($C25:$H25)/$G$5-(ROUND($C25/$G$5,3)+ROUND($D25/$G$5,3)+ROUND($E25/$G$5,3)+ROUND($F25/$G$5,3)+ROUND($G25/$G$5,3)+ROUND($H25/$G$5,3)),0)

回答 (1)

2015-05-29 11:08 pm
✔ 最佳答案
首先轉換了題目要將C25:H25儲存格範圍改為C31:K31,再加入I、J、K三項調整因數:
=ROUND(C31/$G$5,3)+IF(ABS(ROUND(C31/$G$5,3)-C31/$G$5)=MAX(ABS(ROUND($C31/$G$5,3)-$C31/$G$5),ABS(ROUND($D31/$G$5,3)-$D31/$G$5),ABS(ROUND($E31/$G$5,3)-$E31/$G$5),ABS(ROUND($F31/$G$5,3)-$F31/$G$5),ABS(ROUND($G31/$G$5,3)- $G31/$G$5),ABS(ROUND($H31/$G$5,3)-$H31/$G$5),ABS(ROUND($I31/$G$5,3)-$I31/$G$5),ABS(ROUND($J31/$G$5,3)-$J31/$G$5),ABS(ROUND($K31/$G$5,3)-$K31/$G$5)),SUM($C31:$K31)/$G$5-(ROUND($C31/$G$5,3)+ROUND($D31/$G$5,3)+ROUND($E31/$G$5,3)+ROUND($F31/$G$5,3)+ROUND($G31/$G$5,3)+ROUND($H31/$G$5,3)+ROUND($I31/$G$5,3)+ROUND($J31/$G$5,3)+ROUND($K31/$G$5,3)),0)
但要留意此公式有局限,就是當有超過一個百分比數字都是相同最高調幅,便不能正確調整。

2015-05-29 23:24:19 補充:
這裡再詳細一點解釋一下公式怎樣有局限,假設百分比總數是99.9%,調幅是0.1%,當調整的數字只有1個時,將0.1%全加到這個數字便可完成,但當有兩個數字要調整時,如果攤分每個數字0.05%,有可能因四捨五入令兩個數字都加0.1%,變成總共加了0.2%,而百分比總數經調整後是100.1%,反而多了0.1%。如果只選調整的兩個數字當中1個來調,又會出現相同數字但不同百分比的情況,所以這樣調不成,那樣調又不成,就是我之前所說的不可能任務。如果要調整的數字多於兩個時,情況將更多變數,有機會因攤薄了調幅而無法令百分比總數切合100.0%。

2015-05-29 23:24:43 補充:
如果人手聰明地調整也調不來,就不能奢望有神奇公式可以做到,公式只是引入一套邏輯運算減省人手重複的操作,但無法解決在此以外的難題。現在出現了兩個要調整的數字,所以公式難以協助解決如何調整,須用人手決定如何調整。


收錄日期: 2021-04-11 21:04:15
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20150529000051KK00005

檢視 Wayback Machine 備份