Blog · Excel

Excel FILTER and UNIQUE: explained simply

You want to see only the orders of one region from a long list, and you want that list to update itself. That is exactly what the FILTER function does. Here you see what to select, what stands for what and how to enter the formula step by step. Bonus: UNIQUE, so every customer shows up only once.

The whole formula
=FILTER(A2:C13,B2:B13=E2)
1 · What should come back?2 · Which column is checked?3 · What are you looking for?
In one sentence

FILTER fetches every row that meets a condition and lists them automatically: =FILTER(what comes back, which column = what you look for).

What stands for what?

The formula has two required parts. The second one is a column plus a condition. That gives you three things to select or click.

1 · What should come back?
array

The whole table without the header: A2:C13.

Everything you want to see in the result.

2 · Which column is checked?
include

The column with the regions: B2:B13.

Same number of rows as part 1.

3 · What are you looking for?
Condition

The cell with the search value: E2, which says “North”.

Change E2 and the result changes right away.

Rule of thumb: first select what should come back, then the column to check, then “=” and the cell with the search value.

The use case: all orders of one region at a glance

On the left is the order list. In E2 you enter the region you want to see. From E5 down, FILTER lists all matching orders. The colours show what you select:

ABCDEFG
1CustomerRegionRevenueRegion
2Miller LtdNorth1200North
3Baker IncSouth850
4Smith & CoNorth640CustomerRegionRevenue
5Walker LtdWest980=FILTER(A2:C13,B2:B13=E2)North1200
6Hoffman IncSouth1150Smith & CoNorth640
…………………
13Cook LtdEast390
1 · What comes back (A2:C13)2 · Column to check (B2:B13)3 · Condition (E2)Formula in E5, the result spills down by itself

Practice data to copy

Open a blank Excel workbook. Click “Copy data”, click the cell shown in Excel and press Ctrl+V.

Order listpaste into cell A1
CustomerRegionRevenue
Miller LtdNorth1200
Baker IncSouth850
Smith & CoNorth640
Walker LtdWest980
Hoffman IncSouth1150
Miller LtdNorth700
Cook LtdWest520
Baker IncSouth430
Smith & CoNorth910
Richards LtdEast760
Walker LtdWest1040
Cook LtdEast390
Search fieldpaste into cell E1
Region
North

Step by step: how to enter the formula

  1. Type the headers in E4 to G4: Customer, Region, Revenue. FILTER returns the data only, not the headers.
  2. Click cell E5 and type =FILTER(Excel now shows the parts of the formula: array, include, if_empty.
  3. Select A2 to C13: press the mouse on A2, hold, drag to C13, let go. Then type ,
  4. Select B2 to B13 and type =
  5. Click E2, type ) and press Enter.
  6. Done: Excel lists all orders from the North, from E5 to G8. You entered one single formula.
  7. Test it: type “South” in E2. The list switches to the southern orders right away.

This is what cell E5 now says:

What your result looks like

With “North” in E2, FILTER shows these four orders. When a new order from the North is added to the list, it appears here without another click.

CustomerRegionRevenue
Miller LtdNorth1200
Smith & CoNorth640
Miller LtdNorth700
Smith & CoNorth910

Three extras once FILTER works

Every customer only once: UNIQUE

Want to know which customers are in the list at all? UNIQUE removes all duplicates. Seven names remain.

Combined: customers of one region without duplicates

Filter first, then remove duplicates. For “North”, Miller Ltd and Smith & Co remain.

Two conditions and a note for zero matches

The asterisk joins two conditions: region North and revenue above 800. The third part shows when nothing matches.

If it does not work

  • #SPILL! – there is already something below or next to E5. Clear those cells and the result appears.
  • #CALC! – nothing matches the condition, often because of a typo in E2. Add a note like "No matches" as the third part.
  • #NAME? – your Excel version does not know FILTER yet. It exists from Excel 2021 and in Microsoft 365.
  • #VALUE! – the ranges have different lengths, such as A2:C13 and B2:B10. Both must end in row 13.

Excel lists that update themselves

This exercise comes from our advanced Excel training. Your team learns FILTER, XLOOKUP and SUMIFS on its own lists, as corporate Excel training on site or live online. A good next read: Excel drop-down list explained simply.

About the author: Joern Steinz

Joern Steinz is a trainer and the founder of SkillDay. Since 2014 he has facilitated more than 1.000 workshops and trainings, for clients including Allianz, DHL, Lufthansa and Siemens. In his Excel trainings, teams work with real data and leave with templates they use right away.

Deutsche Version: FILTER und EINDEUTIG in Excel · More Excel tips: XLOOKUP, SUMIFS and drop-down lists explained simply · Google Sheets: XLOOKUP

Excel FILTER function: frequently asked questions

How is this different from the filter button?
The filter button only hides rows in the original list. FILTER builds a second list that updates itself with every change. The original list stays untouched.
Can I sort the result?
Yes. Wrap SORT around it: =SORT(FILTER(A2:C13,B2:B13=E2),3,-1) sorts by revenue, largest first.
Why can I not change a cell in the result?
The formula sits in E5 only. The other cells display its result. Change the data in the original list and the result adapts.
Is there FILTER in Google Sheets too?
Yes. The formula above works there the same way.
Which Excel versions have FILTER and UNIQUE?
Microsoft 365, Excel 2021, Excel 2024 and Excel for the web. Excel 2019 and older have neither function.

Microsoft and Excel are trademarks of the Microsoft group of companies; Google Sheets is a trademark of Google LLC. SkillDay is an independent training provider. The practice data is fictitious.