What Most People Miss About How to Do a Query in Excel

It's 4:47 PM on Friday. Your manager just asked for a consolidated report by 5. You have 12 spreadsheets open and no idea how to combine them. The sales team sent raw CSVs. Finance dumped a 42k-row Excel file into Teams. Marketing pasted values into a shared tab — with merged cells, blank rows, and headers renamed three times. You type "query" into Excel’s help bar and get zero useful results.

The Problem

You’re not trying to build a dashboard. You’re trying to answer one question: Which customers in the East region placed orders over $5,000 in Q1 2024? But your data is scattered across files, inconsistent, and unstructured. You try filtering. It breaks when you add a second condition. You try VLOOKUP — but it fails on duplicates and returns #N/A for anything slightly mismatched. You paste everything into one sheet and now column B says "Cust ID", column D says "Client_ID", and column F says "Customer#".

Here’s what your raw data looks like — pulled from three separate tabs named Sales_Q1, Regions, and Customers:

OrderIDCustIDAmountDateRegion
ORD-7821C-4492$6,2402024-02-14East
ORD-7822C-4492$1,8902024-01-30West
ORD-7823C-4501$9,3102024-03-05East
ORD-7824C-4517$4,1202024-01-12East
ORD-7825C-4528$12,6502024-02-28East
ORD-7826C-4533$3,7802024-03-10South
ORD-7827C-4544$5,2102024-01-22East
ORD-7828C-4556$8,4402024-03-18East
ORD-7829C-4569$2,9902024-02-05East
ORD-7830C-4570$11,3002024-03-22East

This table lives in Sales_Q1!A1:E11. There’s no filter. No structured reference. And yes — that $2,990 order (ORD-7829) is included because someone typed "East" with a trailing space. You’ll miss it if you don’t trim.

The Solution

Stop opening Power Query unless you need to merge five sources or clean 100k+ rows. For this exact scenario — answering one precise question from clean-ish data — use Excel’s native FILTER function. It’s faster, lighter, and works in real time.

Do this:

  1. Select cell G1 on the same sheet where your source data lives (Sales_Q1).
  2. Type: =FILTER(A1:E11,(E1:E11="East")*(C1:C11>5000)*(D1:D11>=DATE(2024,1,1))*(D1:D11<=DATE(2024,3,31)),"No matches")
  3. Press Enter.

That single formula returns only rows meeting all four conditions — no helper columns, no sorting, no manual filtering. It spills automatically into G1:K7 (7 rows in this case). If you add new data to A1:E11, the filtered result updates instantly.

Here’s what appears starting at G1:

OrderIDCustIDAmountDateRegion
ORD-7823C-4501$9,3102024-03-05East
ORD-7825C-4528$12,6502024-02-28East
ORD-7827C-4544$5,2102024-01-22East
ORD-7828C-4556$8,4402024-03-18East
ORD-7830C-4570$11,3002024-03-22East

Note: *(C1:C11>5000) uses multiplication instead of commas — this forces Boolean AND logic. Commas would stack vertically (OR logic). This trips up 7 out of 10 people.

Surprising tip: If your data range isn’t fixed, convert it to a Table first (Ctrl+T). Then replace A1:E11 with Table1[#All] and E1:E11 with Table1[Region]. Now the FILTER auto-expands if you add rows — no formula edits needed.

Going Further

You don’t always need FILTER. Excel gives you four distinct query tools. Pick based on your data state and goal:

  • FILTER(): Best for dynamic, live queries against a single table or range. Use when you want instant refresh and formulas stay visible.
  • Advanced Filter: Use when you need to copy results elsewhere or apply complex criteria (like "starts with A" or "not equal to X") without formulas. Press Alt+DAF to open it.
  • Power Query (Get & Transform): Required for merging multiple files, cleaning inconsistent text, or repeating the same steps weekly. Not needed for one-off questions.
  • QUERY() in Google Sheets: Not available in Excel. Don’t waste time searching for it.

To pull customer names from another sheet (Customers!A2:B100, where A = CustID, B = Name), nest XLOOKUP inside FILTER:

=FILTER(CHOOSE({1,2,3,4,5},A1:A11,B1:B11,C1:C11,D1:D11,XLOOKUP(B1:B11,Customers!A2:A100,Customers!B2:B100,"N/A")),(E1:E11="East")*(C1:C11>5000))

This adds a sixth column with names — no helper columns, no drag-down.

If you must use Power Query for multi-source work: Import each table separately. Right-click the first query → Reference. Then go to Home > Merge Queries. Select matching keys. Expand only the columns you need — never “Select All”. Merging 50k rows with 20 expanded columns can slow Excel to a crawl.

When NOT to Use This

FILTER won’t save you in these cases:

  • Your data has duplicate IDs and you need to sum amounts per customer — use SUMIFS or a PivotTable instead.
  • You’re pulling from external databases (SQL Server, Oracle). Use Data > Get Data > From Database, not FILTER.
  • Your date column contains text like "Q1 2024" instead of real dates. FILTER will ignore those rows silently. Fix formatting first.
  • You’re on Excel 2016 or earlier. FILTER doesn’t exist. Use INDEX/MATCH array formulas or Advanced Filter.

Also: Never apply FILTER to entire columns like A:A. It will scan 1M+ rows and crash Excel. Always define a realistic range — even if it’s A1:E10000.

One more warning: If your source data has merged cells in the header row, FILTER fails with #VALUE!. Unmerge them. Always.

Keyboard Shortcuts

These shortcuts cut query setup time in half:

ActionShortcutNotes
Open Advanced FilterAlt + D + A + FWorks even if ribbon isn’t visible
Convert selection to TableCtrl + TRequired before using structured references
Edit current formulaF2Critical when adjusting FILTER ranges
Toggle absolute/relative refsF4Press after selecting a cell reference in formula bar
Open Power Query EditorAlt + A + POnly works if you’ve already loaded at least one query
Rachel Torres

Rachel Torres

Rachel coaches teams on email management and digital communication best practices. She has trained over 5