Variable cell ranges/autosumming?

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
 
R

Ragdyer

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))
 

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