本文介绍了Google Spreadsheet中的动态减法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请查看我的电子表格: https ://docs.google.com/spreadsheets/d/1K5Btg5fFS590G7vZsFiepY-2VTPhzJIlkKK_o-9Ag7E/edit?usp = sharing

Please have a look at my spreadsheet: https://docs.google.com/spreadsheets/d/1K5Btg5fFS590G7vZsFiepY-2VTPhzJIlkKK_o-9Ag7E/edit?usp=sharing

我如何获得:

  • C2显示Start weight(即"100,0")
  • C3显示C2-Daily weightloss(即"99,7701")
  • C4显示C3-Daily weightloss(即"99,5402")
  • C5显示C4-Daily weightloss(即"99,3103")
  • ...等等.
  • C2 to show Start weight (i.e. "100,0")
  • C3 to show C2 - Daily weightloss (i.e. "99,7701")
  • C4 to show C3 - Daily weightloss (i.e. "99,5402)
  • C5 to show C4 - Daily weightloss (i.e. "99,3103")
  • ...and so on.

显然,挑战在于动态地执行此操作,因为所有用户提交的数据以及所有计算出的数据都可能会发生变化.

The challenge is obviously to do this dynamically since all the user-submitted data, and consequently, all the calculated data might change.

我认为可以/应该使用ArrayFormula解决此问题,但我不知道如何解决.

I think this can/should be solved with ArrayFormula somehow but I don't know how.

推荐答案

=ARRAYFORMULA(IF(A2:A;
 MMULT(TRANSPOSE((ROW(INDIRECT("B2:B"&COUNTA(A1:A)))<=
       TRANSPOSE( ROW(INDIRECT("B2:B"&COUNTA(A1:A)))))*
      {B2; TRANSPOSE(SPLIT(REPT(J5*-1&"♦"; COUNTA(A3:A)); "♦"))}); 
 SIGN({B2; TRANSPOSE(SPLIT(REPT(J5*-1&"♦"; COUNTA(A3:A)); "♦"))})^2); IFERROR(1/0)))

这篇关于Google Spreadsheet中的动态减法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 07:29