ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   indirect cell reference (https://www.excelbanter.com/excel-worksheet-functions/214315-indirect-cell-reference.html)

TomCser

indirect cell reference
 
I am trying to do a sum on certain sections of a list that is dynamic. So if
you assume you have a list of 100 cells in a column, and you determine that
you want to sum the values in three sections of this list. The start and
end rows of this list are in cells a1:b3. How would i use the sum function
to sum the values in these three sections?

Thanks in advance for your help!

Tom

smartin

indirect cell reference
 
TomCser wrote:
I am trying to do a sum on certain sections of a list that is dynamic. So if
you assume you have a list of 100 cells in a column, and you determine that
you want to sum the values in three sections of this list. The start and
end rows of this list are in cells a1:b3. How would i use the sum function
to sum the values in these three sections?

Thanks in advance for your help!


Hi Tom,

Let's say your value cells are in C1:C100. I'm assuming columns A and B
are "start" and "stop" row numbers to sum. Then this works:

=SUM(OFFSET(C1,A1-1,0,B1-A1+1))+SUM(OFFSET(C1,A2-1,0,B2-A2+1))+SUM(OFFSET(C1,A3-1,0,B3-A3+1))

There are probably more elegant ways though.


All times are GMT +1. The time now is 09:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com