Home > Software engineering >  How to create formula to Google sheet truth table from another list?
How to create formula to Google sheet truth table from another list?

Time:07-25

I have a list of names in column A and list of dates in column B:

Andrew  03.01.2020
Alex    01.01.2020
John    02.01.2020
John    03.01.2020

And I have table like this

            Andrew  Alex    John
01.01.2020  FALSE
02.01.2020  FALSE
03.01.2020  TRUE

How do I fill the table with TRUE/FALSE of these names and dates from the first list?

Thanks!

CodePudding user response:

Solution

Paste this formula in E2 and drag to other cells take a look at the enter image description here

Explanation

  • FILTER the range $A$1:$A$4 with Condition 1 of FILTER function $A$1:$A$4=E$1 where the range $A$1:$A$4 is equal to E$1.

  • Condition 2 $B$1:$B$4=$D2 where the range $B$1:$B$4 is equal to $D2.

  • lock the row 1 to be able to drag to other cells an refrence a different column but no a different row.

  • now that we have the output test it against the date on the left is it equal? =, this gives TRUE or FALSE output, [Filter output]=[value] -> TRUE / FALSE

  • Related