|
本帖最后由 spaghetti8 于 2024-10-26 10:56 编辑
是这个结果不?
- <div class="blockcode"><blockquote>function makeUpNumber(){
- const getVal = rng => Range(rng).Value2
- const totalMoney = getVal('i3')
-
- const s = {peoples:getVal('b1'),price:getVal('c3')}//student
- const t = {peoples:getVal('f1'),price:getVal('g3')}//teacher
-
- Range('b3').Value(10, Math.round((s.peoples * totalMoney/(s.peoples + t.peoples))*10/s.price)/10)
- Range('f3').Value(10, Math.round((totalMoney - getVal('b3') * s.price)*10/t.price)/10)
- }
复制代码
|
评分
-
1
查看全部评分
-
|