Say I have 100 rows, and I want to sum the content of rows 1 - X, X being an input on the sheet. So if X = 90, I want to sum row 1-90. How can I do this?
Say I have 100 rows, and I want to sum the content of rows 1 - X, X being an input on the sheet. So if X = 90, I want to sum row 1-90. How can I do this?
Last edited by Test123Test; 04-22-2012 at 10:19 AM.
If your numbers to sum are in column A, and the number of the row to sum to is in B1 then something like this:
=SUM(INDIRECT("A1:A" & B1))
Or
=SUM(A1:INDEX(A:A,B1))
So many ways to do this one ...
=SUM(A1:OFFSET(A1,B1-1,0))
=SUMPRODUCT(A1:A1000,--(ROW(A1:A1000)<=B1))
But this one would be least resource hungry (non-volatile):
=SUM(A1:INDEX(A1:A100,B1))
Okay thanks guys! repped and marked as solved
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks