问题
Given this Google Sheet:
I have the following tabs:
Leads To Date
All Enrolled To Date
Leads Never Enrolled
I need the last tab Leads Never Enrolled to have every record from Leads To Date that is not in All Enrolled To Date, per the columns First Name and Last Name.
I have tried using the QUERY function, but I'm not sure how to integrate matching on first and last names within the search argument.
Thanks in advance!
回答1:
You can use FILTER:
=FILTER('Leads To Date'!A:C,COUNTIF('All Enrolled To Date'!A:A&'All Enrolled To Date'!B:B,'Leads To Date'!A:A&'Leads To Date'!B:B)=0)
回答2:
You can try the following formula
=FILTER(A3:C, ISNA(MATCH(A3:A&B3:B, E3:E&F3:F, 0)))
(Please adjust ranges to your needs)
By using ampersands & we join 2 columns creating 1 virtual column resulting the first and last names as one unique value like CaseJustin.
We then use these virtual columns to filter the rest of our ranges.
Functions used:
- FILTER
- ISNA
- MATCH
来源:https://stackoverflow.com/questions/64757802/google-sheet-query-based-on-matching-columns-to-other-sheet