EXCEL 可否set formula : 如細過一個特定數值會自動roundup及自動倍增?!

2008-04-16 7:26 am
我想set excel 表...要求是根據column A 的數值...column B 需要是: 最少要250...以及以50為一進位...(即column A 是275的話...會自動進位至300...如column A數值不足250...亦會自動進位至250...etc)

用IF的話...兩個條件我已知如何分開SET...不過兩個條件一起配合則未能做到...

回答 (2)

2008-04-16 5:36 pm
✔ 最佳答案
建議用 Max函數判斷最小值, 及用Ceiling函數計算50進
B1輸入 =MAX(250,CEILING(A1,50))
2008-04-16 8:29 am
You can use the formula in 參考資料


if the number is 250 or below, will return 250

if the number is 274. will return 250...(because round down to 250)
if the number is 276. will return 300...(because round up to 300)

so that

if the number is 324, will return 300
if the number is 325, will return 350
參考: =IF(A1<=250,250,ROUND(A1/50,0)*50)


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

檢視 Wayback Machine 備份