google spreadsheet - Sum cells from another row based on a cell value -


my code is:

(sum(indirect(address(row()-(i4:i- 1);column()-4;4)&":" &address(row();column()-4;4)))*( ( j4:j ) / 10 )))) 

basically want sum cells gx - gy range determined cell i4. code above works, 1 line. want tod work entire column data is.

=arrayformula( if( j4:j = "" ; "" ; 

so put arrayformula in front , calculation shown data is, result = result of first row??

can tell me why happens, , it?

my sheet: -> https://docs.google.com/spreadsheet/ccc?key=0akkahebdxneddhnnquy5elliwnzrcevedkzpz2h4s1e&usp=sharing

thank tom horwood, answered question:

with magic of matrix multiplication , solution (credit credit due), have managed wrangle want.

=arrayformula(if( j4:j = "" ; "" ; mmult((row(g4:g)>=transpose(row(g3:g)))((row(g4:g)+1-i4:i)<=transpose(row(g3:g)));g3:g) ( ( j4:j ) / 10 ) )) head hurts already, won't go explanatory detail, except key magic happens in

="mmult((row(range1)>=transpose(row(range2)))*((row(range1)+1-i4:i)<=transpose(row(range2)));range2)))" , i've added second sheet public 1 rough equation builder, understanding or alternative applications.

thank tom!!


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -