Excel sum with relative positions
How do I sum from whats in B2 to C2 ?
B2 = A10 or just 10 (preferred)
C2 = A25 or just 25 (preferred)
Normally you would just use SUM(A10:A25), but the values in B2 and C2 are not fixed, they change based on input.
I can use MATCH to find the numbers, but how do I tell SUM to use those numbers ?
The values to sum are always in the same column.
如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。

评论(3)

Use the INDIRECT()
function. You pass it a string that is a range, which allows you to have a dynamic range based on input.


You can use the INDIRECT function for this, e.g.
=SUM(INDIRECT(B2):INDIRECT(C2))
if you can live with entering the entire cell name (A10, A25).
Or to just have the numbers in B2 and C2, you could use
=SUM(INDIRECT(ADDRESS(B2;1)):INDIRECT(ADDRESS(C2;1)))
(Hope I got the columns and rows in the right order!)
发布评论
需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。