But what if we don’t want to (or can’t) add a helper column?
In that case, we can use the SUMPRODUCT function withBoolean logic.
SUMPRODUCT function
TheSUMPRODUCT functionis designed to work with arrays.
It multiplies corresponding elements in two or more arrays and sums the resulting products.
This allows us to perform a comparison between current and previous sales directly inarray1.