Free LAMBDA – SUMPRODUCT for 2D arrays

 

IFOMITTED = LAMBDA(arg,then,IF(ISOMITTED(arg),then,arg));
SUMPRODUCT2 = LAMBDA(array, [axis], 
    SUM(IF(IFOMITTED(axis,0)=0, BYROW, BYCOL)(array, PRODUCT))
);

I wanted to be able to pass a 2D array as a single argument to SUMPRODUCT. But it doesn’t work like that, so I worked around it and created SUMPRODUCT2.

This document shows my thought process and steps I went through to get to the final result.

I hope you find it interesting.

Here’s a link to the original post of this content on LinkedIn.

Multi-column-SUMPRODUCT-Owen-Price

Comments

One response to “Free LAMBDA – SUMPRODUCT for 2D arrays”

  1. sandeep kothari

    Brilliant use of LAMBDA to achieve what SUMPRODUCT cannot do!

Leave a Reply

Your email address will not be published. Required fields are marked *