indirect cell reference

T

TomCser

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
 
S

smartin

TomCser said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top