Variable cell ranges/autosumming?

  • Thread starter Thread starter Zerex71
  • Start date Start date
Z

Zerex71

Group,

Another question I have is, is there a way to have variable ranges used
for functions such as autosumming? For example, let's say the user
enters a 5 in a given cell, and the purpose of that 5 is to tell the
spreadsheet how many cells in a row or column to add up. If the user
enters 10, then the autosum selects 10 cells and adds them up. Is
there a way to do something like this, using user data to control a
function like this?

Mike
 
Say you wanted to total Column A,
From A1 to the row number that you enter in B1.

=SUM(A1:INDEX(A:A,B1))

OR ...

You want to total Column A,
*Starting* at the row in B1,
And *ending* at the row in B2.

=SUM(INDEX(A:A,B1):INDEX(A:A,B2))
 
Back
Top