Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
Heads up: Excel and Google Sheets do this differently.
=IFERROR(VLOOKUP(A2,'[Source.xlsx]Sheet1'!$A:$D,2,0),"Not found")=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/","Sheet1!A1:D"),"SELECT Col1, Col2, SUM(Col4) WHERE Col3 = 'Active' GROUP BY Col1, Col2 LABEL SUM(Col4) 'Total'",1)Computed by a real spreadsheet engine on the sample data below.
| Client | Region | Status | Revenue |
| Acme Corp | North | Active | 12000 |
| Beta LLC | South | Inactive | 4500 |
| Gamma Inc | North | Active | 8750 |
| Delta Co | East | Active | 6300 |
=IFERROR(VLOOKUP(A2,'[Source.xlsx]Sheet1'!$A:$D,2,0),"Not found")→Not found
Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Need it for your exact data?
Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.
No. IMPORTRANGE and QUERY are both Google Sheets-only. In Excel, use Power Query (Data → Get Data → From Workbook) to connect to another .xlsx file and apply filters and aggregations there.
A #REF! error from IMPORTRANGE usually means the source file has been moved, renamed, or the sharing permission was revoked. Check that the URL is still valid and the source file is still shared with the account running the formula.
Not directly in a single QUERY call. Use curly-brace array notation to stack ranges: ={IMPORTRANGE("URL1","Sheet1!A:D");IMPORTRANGE("URL2","Sheet1!A:D")} and then wrap the whole thing in QUERY.
Use Google Sheets QUERY with a WHERE clause to filter rows dynamically — Excel users can use FILTER as the equivalent.
Error fixQUERY parse error in Google Sheets means the SQL-like query string has a syntax mistake. Find the exact error and fix it here.
How-toUse Google Sheets QUERY with GROUP BY and SUM to aggregate data by category — use SUMIF for the Excel equivalent.
How-toUse QUERY GROUP BY with multiple columns in Google Sheets to create multi-level summaries. Excel alternative uses SUMIFS with multiple criteria ranges.
How-toFilter QUERY results in Google Sheets using WHERE with AND and OR conditions. Excel users can replicate this with FILTER using * for AND and + for OR.
How-toBuild a running total in Google Sheets by combining QUERY for ordering with ARRAYFORMULA and SUMIF. Excel alternative uses a simple SUMIF with a locked anchor row.
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: