Sum with matrix functions?
Another option is to use a same-sized matrix to assign cells a 'skew group'number, and use a formula
like
=SUMPRODUCT(Matrix*(SkewNumbers=1))
You could have the Skew Index increment when copied by using something like this
=SUMPRODUCT($B$2:$F$6*($B$8:$F$12=ROW(A1)))
and then copying down
(if your skew groups are, say, 1 to 5)
HTH,
Bernie
MS Excel MVP
"Aale de Winkel" wrote in message
...
Using Excel in magic square research I created a lot of rather complicated
matrix statements doing simple things, summing a skew line I need to pick
each cell seperately. I thought using sum with a fairly simple matrix
function would save a lot of work attempts like
SUM(index(A1:F6;row()-row(a1)+(rowcel)+1;column()-column(a1)+(colcel)+1))
(discarding the function (rowcel) and (colcel) for this post which are
stements using the target row / column)
failed me, sum seems not to be matrix function capable, nor can I find a sum
version that would do the trick (is there any(?)) could matrix cabability be
added in future Excel.
Small matrices aren't a problem if course but for magic squares of higher
order using matrix functions within sum() would save a lot of work copying
and pasting.
|