Ask Your Question
0

Sum #rows where # is the number of rows which shall be summarised

asked 2016-06-28 16:32:27 +0100

cje gravatar image

updated 2016-06-28 16:34:43 +0100

Hi, I have random numbers in 100 rows; from A1:A100 In row B I have a value which indicate how many rows that shall be summarised.

E.x
# A - B (row)
1 2 - 2
2 4
3 3 - 4
4 5
5 1
6 2

So in B1 there is a 2 which means that I shall summarise A1:A2 (=6), and in B3 there is a 4 which means that I shall summarise A3:A6 (=11)

I need to make a sum formula which does this automatically. Does anyone know a way to do that.....?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2016-06-28 17:17:29 +0100

pierre-yves samyn gravatar image

Hi

You can use something like =IF(B1<>"";SUM(OFFSET(A1;0;0;B1));"")

See SumRow.ods

Regards

edit flag offensive delete link more
0

answered 2016-06-28 17:43:28 +0100

cje gravatar image

Great! Thanks a lot!

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-06-28 16:32:27 +0100

Seen: 28 times

Last updated: Jun 28 '16