简体   繁体   English

需要帮助创建一个有点奇怪的 Excel 公式

[英]Need help creating a somewhat odd Excel formula

I'm trying to create a formula that takes C2-B2 and uses the result to determine which cells to add together.我正在尝试创建一个公式,该公式采用 C2-B2 并使用结果来确定要加在一起的单元格。 So if the result is 2 it takes AA2 and AB2, adds them together, and displays the result.因此,如果结果为 2,则取 AA2 和 AB2,将它们相加并显示结果。 In other words, it counts cells stemming from a point and adds them, with the amount counted determined by the result of two other cells.换句话说,它计算来自一个点的细胞并将它们相加,计数的数量由其他两个细胞的结果决定。

This doesnt sound recursive the way you describe it.这听起来不像你描述的那样递归。

Put this formula somewhere on the sheet and see if this is what you want:将此公式放在工作表的某个位置,看看这是否是您想要的:

=SUM($AA$2:INDEX($AA$2:$XFD$2, 1, SUM($B$2:$C$2)))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM