I have a matrix 3×4, I want to subtract 2 for each cell and I need the sum off all cell that is greater than zero. see image below that answer should be 22
0 1 5
3 4 1
3 8 9
4 2 0
I tried manually but I need to convert this into function
>Solution :
=LET(
a,A1:C4-2,
SUM((a>0)*a))
Older Versions:
=SUMPRODUCT((A1:C4-2>0)*(A1:C4-2))

