Question: I have this grid:

```
1   2   3   4   5

2   3   4   5   6

3   4   5   6   7

4   5   6   7   8

```

I do cumulative totals along rows, so I get:

```
1   3   6   10  15

2   5   9   14  20

3   7   12  18  25

4   9   15  22  30

```

Then I count along columns for cumulative totals that are more than 3, so I get:

```
1   3   4   4   4

```

Now can I get to the final single row result without creating an interim grid in between (containing the cumulative totals)? I have a lot of data and need to conserve on cells.

Answer: 
This is possible, but you need to know the basics of Matrix Multiplication to understand and suit the formula to your array. If A1:E4 had the first Matrix in your example, Solution:

```
=ARRAYFORMULA(MMULT(--TRANSPOSE(MMULT(A1:E4,--(TRANSPOSE(COLUMN(A1:E4))<=(COLUMN(A1:E4))))>3),ROW(A1:A4)^0))

```

* Inner MMULT to do cumulative totals across the row.
* Outer MMULT to count the total, If the condition `>3` is satisfied.
* Compare COLUMN( or ROWs , Whichever is longer) to get the desired {1,0} array to MMULT.
You can try:

```
=ARRAYFORMULA(countif(A:A,">3"))

=ARRAYFORMULA(countif(((A:A)*(B:B)),">3"))

=ARRAYFORMULA(countif(((A:A)*(B:B)*(C:C)),">3"))

=ARRAYFORMULA(countif(((A:A)*(B:B)*(C:C)*(D:D)),">3"))

=ARRAYFORMULA(countif(((A:A)*(B:B)*(C:C)*(D:D)*(E:E)),">3"))

```

The "\*" is a "+" in this context.