How to Use the FILTER Function in Excel 365/2021
Read this guide in: English · मराठी · हिंदी
The FILTER function (Excel 365 / 2021) spills every row that matches a condition — a dynamic array, not a one-cell answer.
Chala mitrano! AutoFilter hides rows on the sheet. FILTER formula spills matching rows somewhere else. Why? Live Mumbai-only view that updates. How? One formula, empty space below. Stay with me.
Quick answer
Vertical steps:
- Confirm Microsoft 365 or Excel 2021.
- Keep a clean City / Channel / Amount table.
- Click an empty cell with free space below.
=FILTER(A2:C4, A2:A4="Mumbai")(adjust ranges).- Press Enter — matching rows spill.
- Point the city at a criteria cell to switch cities.
=FILTER(A2:C4, A2:A4="Mumbai", "No rows")
Language: English · मराठी · हिंदी
Before and after (look at the tables first)
Before — full table
| City | Channel | Amount |
|---|---|---|
| Mumbai | Online | 100 |
| Pune | Online | 40 |
| Mumbai | Store | 50 |
After — FILTER City = Mumbai (spilled)
| City | Channel | Amount |
|---|---|---|
| Mumbai | Online | 100 |
| Mumbai | Store | 50 |
Before
आधी (Before)
पहले (Before)
After
नंतर (After)
बाद में (After)
Why FILTER?
- Results sit in a separate spill block — source stays visible.
- Change criteria → spill updates.
- Works with other dynamic arrays (SORT, UNIQUE) later.
What happens
- Excel tests each row’s City.
- Keeps Mumbai Online 100 and Mumbai Store 50.
- Drops Pune 40.
- Spills two rows starting at your formula cell.
Errors you will meet
| Error | Meaning | Fix |
|---|---|---|
#SPILL! |
Blocked cells in the spill range | Clear cells below/right |
#CALC! |
Often no match | Add if_empty message; check spelling |
#NAME? |
Excel too old for FILTER | Use 365/2021 or AutoFilter |
Vertical practice steps
- Type the three-row table.
- In E2:
=FILTER(A2:C4,A2:A4="Mumbai","No rows"). - Confirm two spilled rows.
- Change to
"Pune"→ one row (40). - Put city name in G1; use
A2:A4=G1. - Block the spill with a random value under E2 — see
#SPILL!, then clear it.
FILTER vs AutoFilter
| AutoFilter | FILTER function |
|---|---|
| Hides rows on the same sheet | Spills a copy elsewhere |
| Click UI | Formula-driven |
| All Excel versions | 365 / 2021 |
Ravindra Bagale's Tip
Leave a blank landing zone under the formula — FILTER is hungry for space. If #SPILL! appears, look for one stubborn value in the way, not a “broken” FILTER.
Practice task
- Ten sales rows, three cities.
- FILTER one city into a spill block.
- Add if_empty =
"No sales for this city". - Try FILTER with Channel =
"Online"on the same data.
Learn it properly
Course lessons:
Related guides: SUMIF and SUMIFS · Create PivotTable · XLOOKUP for beginners
Samajla ka? FILTER spills matching rows on Excel 365/2021. Keep spill space clear. Aata practice sheets var try kara — Excel basics solid hotat.
Frequently asked questions
What is FILTER?
A dynamic array function that returns all rows (or columns) that match a condition, spilling into neighbouring cells.
Which Excel versions?
Microsoft 365 and Excel 2021. Older versions need AutoFilter or Advanced Filter.
What is #SPILL!?
Something blocks the spill range (a value in the way). Clear the cells below/right of the formula.
What is #CALC!?
Often no rows matched. Use the optional if_empty argument for a friendly message.
Multiple conditions?
Multiply conditions for AND, or use addition patterns for OR — practise AND first.
Course lesson?
Chapter 9 Dynamic Arrays — FILTER.