Search code examples
google-sheetsfiltergoogle-sheets-formulacountifgoogle-query-language

How can I correlate rows in two sheets in Google Sheets?


In a Google Sheet there are two pages with correlated data. On a third page, how can I get a list of all user names that are associated with an account that has a subscription_type=1?

  • Page1 (users) has columns A (name) and B (account_id).
  • Page2 (accounts) has columns A (account_id) and B (subscription_type)

Unfortunately, the QUERY function can only work on one sheet at a time.


Solution

  • try:

    =FILTER(A:A, IFNA(VLOOKUP(B:B, Page2!A:B, 2, 0))=1)