简体   繁体   中英

The sum of a vertical section based on an two points in adjacent column

I need a function to add vertical cells based on input from another cell. For example, in the image, the input cell value is 12, so I the sum from zero to 12 of the highlighted blue section.

It will also start at zero but the value may change to 24, 36 etc.在此处输入图像描述

You can use this formula with a helper cell:

=SUM(D4:INDIRECT("D"&B1+4))

Where--

  • D4 is the start range (starting 0 on PMT).
  • B1 is the helper cell/ end of range.

Kindly see the result below: 结果

You may refer to this link for more detailed explanation:

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