简体   繁体   中英

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. So if the result is 2 it takes AA2 and AB2, adds them together, and displays the result. 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)))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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