問題已解決
老師,你好。在Excel表中,怎樣用已知金額,快速湊出單價(jià)和數(shù)量都是整數(shù)倍?單價(jià)取數(shù)一般在50-250之間,數(shù)量可以是隨意整數(shù)
![](https://member.chinaacc.com/homes/resources/images/home/avatar/5.jpg)
![](/wenda/_nuxt/img/iconWarn.60bd4fe.jpg)
![](https://pic1.acc5.cn/011/89/54/03_avatar_middle.jpg?t=1651216833)
您好,邏輯關(guān)系是要先算單價(jià),取50-250的整數(shù),那單價(jià)公式就是=RANDBETWEEN(50,250),然后用金額除以單價(jià),算出數(shù)量,直接用round函數(shù),將數(shù)量取整。round函數(shù)保留0位小數(shù)。即可
2021 02/24 12:45
![](http://member.chinaacc.com/homes/resources/images/home/avatar/5.jpg)
84785045 ![](/wenda/_nuxt/img/reply1.d92ea43.png)
![](/wenda/_nuxt/img/reply1.d92ea43.png)
2021 02/24 12:51
老師,你好。你方便幫我演算一下公式是怎么寫的嗎?例如金額是594033.70元,單價(jià)50-250之間都行,求一個(gè)整數(shù)數(shù)量,數(shù)量的小數(shù)位都必須是零,麻煩你了
![](https://pic1.acc5.cn/011/89/54/03_avatar_middle.jpg?t=1651216833)
李李老師 ![](/wenda/_nuxt/img/reply2.28c7604.png)
![](/wenda/_nuxt/img/reply2.28c7604.png)
2021 02/24 13:03
您好,金額是594033.7元,詳見圖片,注意如果您這邊是好多金額一起計(jì)算單價(jià)和數(shù)量,建議下拉公式計(jì)算完畢后,將單價(jià)選中變?yōu)閿?shù)值,因?yàn)閞andbetween函數(shù)是隨機(jī)函數(shù),重新打開文件或者進(jìn)行操作,單價(jià)公式會(huì)變動(dòng)。
![](http://member.chinaacc.com/homes/resources/images/home/avatar/5.jpg)
84785045 ![](/wenda/_nuxt/img/reply1.d92ea43.png)
![](/wenda/_nuxt/img/reply1.d92ea43.png)
2021 02/24 13:16
老師,2700那里不能用函數(shù)保留0個(gè)小數(shù)點(diǎn),220?2700=594000
金額必須是594033.40才行
![](http://member.chinaacc.com/homes/resources/images/home/avatar/5.jpg)
84785045 ![](/wenda/_nuxt/img/reply1.d92ea43.png)
![](/wenda/_nuxt/img/reply1.d92ea43.png)
2021 02/24 13:16
我是銷售夾板,只能按照整數(shù)數(shù)量和整數(shù)單價(jià)來銷售
![](http://member.chinaacc.com/homes/resources/images/home/avatar/5.jpg)
84785045 ![](/wenda/_nuxt/img/reply1.d92ea43.png)
![](/wenda/_nuxt/img/reply1.d92ea43.png)
2021 02/24 13:52
老師,也算不出來,試了好久了
![](https://pic1.acc5.cn/011/89/54/03_avatar_middle.jpg?t=1651216833)
李李老師 ![](/wenda/_nuxt/img/reply2.28c7604.png)
![](/wenda/_nuxt/img/reply2.28c7604.png)
2021 02/24 14:26
您好,您要求都保留整數(shù),這樣兩個(gè)成績,肯定是不等于合計(jì)金額的。
![](/wenda/img/newWd/sysp_btn_eye.png)