K
kcc
This is a simplified example of what I'm trying to do.
Assume A1 to F100 has data. I want an array formula that
will calc something like
=SUM(IF((A1:A100>0)*(B1:B100<0),A1:A100-xxxx(C1:E100),B1:B100-xxxx(C1:F100)))
or similar using SUMPRODUCT.
Basically for each row calc
if(and(A1>0, B1<0),A1-sum(C1:E1),B1-sum(C1:F1))
and then sum the rows. Sum used where xxxx is doesn't
work because it needs to return an array, not the sum of
all rows and columns. xxxx needs to sum the columns,
but return a separate answer for each row.
The real problem has lots of columns and lots of groupings
so adding subtotal columns is not practical, nor is anything
identifying each column separately.
Thanks, kcc
Assume A1 to F100 has data. I want an array formula that
will calc something like
=SUM(IF((A1:A100>0)*(B1:B100<0),A1:A100-xxxx(C1:E100),B1:B100-xxxx(C1:F100)))
or similar using SUMPRODUCT.
Basically for each row calc
if(and(A1>0, B1<0),A1-sum(C1:E1),B1-sum(C1:F1))
and then sum the rows. Sum used where xxxx is doesn't
work because it needs to return an array, not the sum of
all rows and columns. xxxx needs to sum the columns,
but return a separate answer for each row.
The real problem has lots of columns and lots of groupings
so adding subtotal columns is not practical, nor is anything
identifying each column separately.
Thanks, kcc