英文:
How to use Lambda so the if statement is it's own test condition without rewriting if statement in google sheets
问题
这是一个一般性问题,不基于具体的公式 - 但我无法在任何地方找到答案 - 但似乎应该是可能的。
在这个截图中,为了举例,您、Y 和 X 是相同的(有细微差异,但为了举例而言 - 让我们假设它们相同)。
在公式中,相同的公式用于 if 语句,以确定我们是否应该继续实际计算公式。是否有一种方法可以使用 Lambda 来避免重复公式?
英文:
This is a general question based not on specific formula - but I couldn't find an answer to it anywhere - but it seems like it should be possible.
In this screenshot, you, Y and X are the same for the sake of example (there is a slight difference, but for example's sake - let's assume it's the same).
In the formula, the same formula is used in an if statement to determine if we should move forward with actually calculating the formula. Is there a way to use lambda not to repeat the formula?
答案1
得分: 1
=lambda(X,if(X>0,X,0))(FORMULA)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论