“QUERY” Function
A QUERY allows you to perform database-type searching in Google Sheets, so you can
FIND, FILTER, and FORMAT data.
=QUERY(data, query, [headers])
● Data: The range of cells to perform the query on.
○ Use IMPORTRANGE to use data from another spreadsheet.
● Query: search to perform (Google Visualization API Query Language)
● Headers: Optional field to specific number of header rows at top of data.
Example: =query(IMPORTRANGE(Financial_Data,"FinancialData"),
"Select Col1,Col2,Col3,Col4,Col6,Col7,Col8,Col9,Col10 Where Col1 Matches
'"&AccountGroup&"' order by Col2",0)