I am using IMPORTRANGE within a query to extract data from sheet 1 to sheet 2. The following code is in a cell in tab A of sheet 2, and works as intended:
=query(importrange("URL-A","E:J"), "select * where Col6 = TRUE AND Col4 IS NOT NULL")
That is, it extracts the correct data from sheet 1, tab A. Note that URL-A is specific to tab A.
However, when I attempt to extract data from tab B:
=query(importrange("URL-B","C:J"), "select * where Col2 IS NOT NULL AND Col8 = TRUE AND Col6 IS NOT NULL")
where URL-B is specific to tab B, the data is still being extracted from tab A.
In other words, IMPORTRANGE seems to be extracting data from the first tab, despite specifying URLs that are specific to other tabs.
Is there additional or different IMPORTRANGE syntax required to refer to different tabs?