Reputation: 67
3000 Rows of data and need a formula to be applied to calculate percentages in blocks of 4 rows.
I've tried dragging the formula down and playing around with Offeset function, but can't figure out a correct way for doing it.
THANKS EVERYONE FOR YOUR HELP, FOUND A SOLUTION! Looks like I should have mentioned that the counts were weighted so calculations were based off of the actual number not the rounded one displayed.
Upvotes: 0
Views: 479
Reputation: 152605
Use:
=M11/SUM(INDEX(M:M,INT((ROW(1:1)-1)/4)*4+11):INDEX(M:M,INT((ROW(1:1)-1)/4)*4+14))
Upvotes: 2
Reputation: 3062
Here is a solution not using INDIRECT
:
=$M11/SUM(INDEX($M:$M,(ROUNDDOWN((ROW(1:1)-1)/4,0)*4)+11):INDEX($M:$M,(ROUNDDOWN((ROW(1:1)-1)/4,0)*4)+15))
Upvotes: 1
Reputation: 388
This solution assumes that the values in the far left column will always be the same.
=IF(A1="B2",C1/SUM(INDIRECT("C"&ROW(A1)&":C"&ROW(A1)+3)),IF(A1="M3",C1/SUM(INDIRECT("C"&ROW(A1)-1&":C"&ROW(A1)+2)),IF(A1="T2",C1/SUM(INDIRECT("C"&ROW(A1)-2&":C"&ROW(A1)+1)),C1/SUM(INDIRECT("C"&ROW(A1)-3&":C"&ROW(A1))))))
It's long but gives these results.
Upvotes: 0