Brian Chew
Brian Chew

Reputation: 55

How to do multiplication of value in an array for Google Sheet?

I have 2 tables in Google Sheet: Order and ItemOrder.

Order Table: Order Table

ItemOrder Table: enter image description here

The idea is that if I ticked all ORD0002 in ItemOrder Table, the Packed column in Order Table should be ticked as well. I have successfully getting the array of the packed using the Filter function. The question now, can I multiple the value within the array. Understand that unticked is 0/FALSE and ticked is 1/TRUE. If I multiple everything and it is 0, then the value in Order Table should also be 0. It will be 1 only if all the values in ItemOrder are 1.

Or is there any other way to achieve this without script?

Upvotes: 1

Views: 1062

Answers (1)

user13338210
user13338210

Reputation:

Formula:

=AND(FILTER(A1:B14, A1:A14 = D3))

Apply this formula to Order Table. In my case, I put that on E3

Sample Sheet where it is used:

multiple-check

Another screenshot for clarity:

checked

Unchecking:

uncheck

Using ARRAYFORMULA

=ARRAYFORMULA(AND(FILTER(B1:B14,A1:A14=D3)))

using arrayformula

NB: Here example 1 is of the previous formula. example 2 is using ARRAYFORMULA

Upvotes: 1

Related Questions