Google Sheet Query Based on Matching Columns to Other Sheet

谁说我不能喝 提交于 2021-01-07 01:22:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!