I want to fill in several columns in a table based on data from another table. If an email exists in the original table, and its row also has a value that matches the Source
column, return true
.
This is what my original source table looks like.
Email | Source
---------------------------
[email protected] | A
[email protected] | B
[email protected] | A
[email protected] | C
[email protected] | A
And this is what my results table looks like.
Email | A | B | C
-----------------------------------
[email protected] | Yes | Yes |
[email protected] | Yes | |
[email protected] | | | Yes
[email protected] | Yes | |
Columns with the headings A
, B
, and C
would be the formulas checking for a true
or false
value based on the above table. The formula would then enter "Yes" for true
or leave the cell blank for false
.
Here is an example of what the formula would look like in Column A. I attempt to match Email
to Email
, and then the string "A" to the Source
column. Unfortunately this returns true for all rows.
=IFERROR(IF(AND(MATCH([Email],source[Email],0),MATCH("A",source[Source],0)),"Yes",""),"")