How to FILTER with Multiple Criteria in Excel

  Рет қаралды 309,904

Leila Gharani

Leila Gharani

Жыл бұрын

Join 400,000+ professionals in our courses: www.xelplus.com/courses/
In this video, we’ll set up the FILTER function with two criteria in different columns. Both of these conditions have to be met (AND) for the result to be included. If you're searching for how to FILTER your data with multiple criteria, this video has the answer. If you need OR criteria, for example looking up two different values within the same column, you'll need to use the PLUS operator.
🌍 My Online Excel Courses ► www.xelplus.com/courses/
🎬 LINK to more KZbin Shorts videos: • Shorts (Tips, Tricks &...
👕☕ Get the Official XelPlus MERCH: xelplus.creator-spring.com/
🎓 Not sure which of my Excel courses fits best for you? Take the quiz: www.xelplus.com/course-quiz/
📚 Excel RESOURCES I Recommend: www.xelplus.com/resources/
🎥 GEAR I use: www.xelplus.com/resources/#gear
More resources on my Amazon page: www.amazon.com/shop/leilagharani
🚩Let’s connect on social:
Instagram: / lgharani
Twitter: / leilagharani
LinkedIn: / leilagharani
👉 This description contains affiliate links, which means at no additional cost to you, we will receive a small commission if you make a purchase using the links. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!
#Excel

Пікірлер: 141
@LeilaGharani
@LeilaGharani Жыл бұрын
📎More explanation and examples in this video: kzbin.info/www/bejne/Z56rcommqbp-d80
@ranua9327
@ranua9327 6 ай бұрын
I cannot use the link ☹️. Impossible to copy or click.
@joevano
@joevano Жыл бұрын
I think it is helpful to understand that true = 1 and false = 0, which is why you multiply for AND and add for OR. Going the other direction 0 evaluates to false and not 0 is true. Knowing this helps for all kinds of excel “tricks”.
@GaragePrimo
@GaragePrimo Жыл бұрын
Thank you! I was just coming to the comments hoping for an explanation of this!
@LeilaGharani
@LeilaGharani Жыл бұрын
Yes. Thanks - I’ve explained in my longer form videos on Filter. I’ll be doing another one specifically for this.
@Akbar194
@Akbar194 Жыл бұрын
​@@LeilaGharani can we use sum formula in exact last cell of filtered data? it may be changed length of filtered data.
@MLL124
@MLL124 Жыл бұрын
That was a very useful tip to remember!!! Thank you!
@brycejohansen7114
@brycejohansen7114 Жыл бұрын
The adding as an OR is a bit dodgy since two true return values added together is going to be two rather than one.
@terdik36
@terdik36 Жыл бұрын
are those breaking bad characters? 💀
@infallibleblue
@infallibleblue Жыл бұрын
Omg I thought it was such particular names
@dougidoug
@dougidoug Жыл бұрын
Of course Walter gets an A in chemistry. After all he is the best cook.
@a.saddama.hafeez8518
@a.saddama.hafeez8518 Жыл бұрын
Underrated and unexpected comment
@dougidoug
@dougidoug 10 ай бұрын
Well you do try. Some people are just not that observant.
@travisos7199
@travisos7199 Ай бұрын
Thank you very much, i needed this video 🙏
@krishnatate4765
@krishnatate4765 Жыл бұрын
Thx for information *,+
@iri_neko
@iri_neko 4 ай бұрын
Thank you! very fast explanation
@tikooashish
@tikooashish Жыл бұрын
Awesome, thanks for tip
@Slyh01
@Slyh01 Жыл бұрын
a much more straightforward approach is to turn data into a table and use slicer.
@j.ballsdeep420
@j.ballsdeep420 Жыл бұрын
Love the logic. I wouldn't have went here and just used table references in a formula still but love A) Using a table to reduce calculation time and being dynamic B) Slicer would be the most straight forward method. Kudos
@amila247
@amila247 10 ай бұрын
Thanks !!!
@eslamfahmy87
@eslamfahmy87 Жыл бұрын
Excel by the easiest instructor
@bluza451
@bluza451 Жыл бұрын
Thank you!
@justinriehl4183
@justinriehl4183 Жыл бұрын
The only drawback to this is it only works if you have only 2 things to filter. Not for more. I had to get really creative to have 3 or 4 filtering criteria
@sidahmedbensaad1838
@sidahmedbensaad1838 6 ай бұрын
Thanks Leila
@NaftuliSinger
@NaftuliSinger Жыл бұрын
That's so helpful.
@prathameshbile5865
@prathameshbile5865 Жыл бұрын
Thank You! ❣️
@krishnatate4765
@krishnatate4765 9 ай бұрын
Excellent ma'am 😊
@CallumPooleProgrammer
@CallumPooleProgrammer Жыл бұрын
Or in SQL: SELECT Student FROM Table WHERE chemistry='A' AND geography='A'
@Dxgreen
@Dxgreen Жыл бұрын
I was thinking the same thing 😄
@brainaustin5911
@brainaustin5911 Жыл бұрын
I
@PurplePegasus2531
@PurplePegasus2531 Жыл бұрын
THANK YOU!!! I'm learning python and sql and this really helps!
@j.ballsdeep420
@j.ballsdeep420 Жыл бұрын
Ftw
@zl888
@zl888 11 ай бұрын
i think excel is better
@abdulrahmanmuslih141
@abdulrahmanmuslih141 Жыл бұрын
Thanks
@M.A.007
@M.A.007 Жыл бұрын
دمت گرم. 👍🏻
@hemvaidya
@hemvaidya Жыл бұрын
VERY VERY USEFUL
@BenDieselBasicAutomotive
@BenDieselBasicAutomotive Жыл бұрын
Thank you again, Mam....
@excelenko
@excelenko Жыл бұрын
I always use + and * instead of "AND" "OR" - works fine!
@bobgreenfield9158
@bobgreenfield9158 18 сағат бұрын
No
@excelenko
@excelenko 16 сағат бұрын
@@bobgreenfield9158 yes
@Dulitzlives
@Dulitzlives Жыл бұрын
Excellent
@armin0815
@armin0815 6 ай бұрын
I typically compare the concatenated string - using the function or & but I guess this is more elegant. 😊
@flipsspillow
@flipsspillow Жыл бұрын
Danke Oida! Voll hilfreich! :D
@themadhiker
@themadhiker 6 ай бұрын
You’ve literally just saved my life with this 🤣
@alihms
@alihms Жыл бұрын
Was excited for this info. Only to realise my work pc is still on Excel 2016 :-(
@gorflunk
@gorflunk Жыл бұрын
Here's a "legacy" array formula that will do it, it must be entered using the key combo CTRL+SHIFT+ENTER instead of just ENTER into cell G3: =@IF(ROWS($G$3:G3)>SUMPRODUCT(($B$2:$B$11="A")*($C$2:$C$11="A")),"",INDEX($A$2:$A$11,SMALL(IF($B$2:$B$11="A",IF($C$2:$C$11="A",ROW($A$2:$A$11)-ROW($A$2)+1)),ROWS($A$2:A2)))) Once you have entered it you will see that Excel has added curly brackets at the beginning and end of the formula. Drag the formula down to cell G12. Seems straightforward to me...
@alihms
@alihms Жыл бұрын
@gorflunk Thanks. Time to brush up on my Excel arrays skill.
@hawrehawre3216
@hawrehawre3216 Жыл бұрын
LOVE YOUUUUUUU
@mulisaurus
@mulisaurus Жыл бұрын
This is great...I use another way of incorporating Index Match but this seems slightly more simple to use.
@storywha2011
@storywha2011 Жыл бұрын
Hi Leila, I really love your tips. I have for you that looks similar to this. I have a lottery syndicate with 20 members. They all have different numbers so how do I get excel to highlight when a number drawn matches one of theirs on a weekly basis?
@kiragi17
@kiragi17 Жыл бұрын
I multiply results from logic checks all the time. Sometimes in nested Index(match(index())) format. In situations where I can use FILTER instead, it should massively reduce the processing load on excel. Thanks!
@j.ballsdeep420
@j.ballsdeep420 Жыл бұрын
Or you could use tables and table references with absolutes. Even further reduce the calculation run time. Get real fancy could have just made a PowerPivot table but meh
@annog6673
@annog6673 Жыл бұрын
The or condition only works if the conditions never occur simultaneously... because it just adds up 1s and if you go to 2 it breaks. Please mention that somewhere it can lead to serious errors.
@LeilaGharani
@LeilaGharani Жыл бұрын
Yes. I’ll cover that in a longer video version 🙌
@annog6673
@annog6673 Жыл бұрын
@@LeilaGharani yes please. Literally nobody gives that hint... not even the official documentation. It is always assumed to be obvious (which it is only when you look at it as summation of 1s and 0s... but nobody talks that way. I mean having more than 2 conditions is also pretty common)
@kenfischer8447
@kenfischer8447 10 ай бұрын
You could have used the AND function, correct?
@theworldbroker
@theworldbroker Жыл бұрын
give more about connecting multiple tables in one slicer.
@siyabulelatshali1012
@siyabulelatshali1012 Жыл бұрын
Dope 👍.
@jayeshdhuri8125
@jayeshdhuri8125 2 ай бұрын
How to display data from two different sheets using filter function specifically when the condition is " or " either in 1 sheet or second sheet
@archieb1196
@archieb1196 Жыл бұрын
how can we use NOT as a criterion?
@Envy_Alvin
@Envy_Alvin Жыл бұрын
From my experience using Let Function and 2 Filter Formulas so that you could amend the criteria easily to suit any changes needed to made.
@JJ_TheGreat
@JJ_TheGreat Жыл бұрын
Are you referring to Power Query?
@BudiBudi-tx9md
@BudiBudi-tx9md Жыл бұрын
Does this completely replaces the AND( ) or the OR ( ) formula?
@sgallegos702
@sgallegos702 Жыл бұрын
How do you get excel to highlight or filter cells with the same name? I.e. Disney on page 1, page 2.
@lydethful
@lydethful Жыл бұрын
How about both AND and OR?
@adin6429
@adin6429 Жыл бұрын
Is there any way to have array criteria in the filter function?
@user-hf9hn2jf6e
@user-hf9hn2jf6e 8 ай бұрын
How choose only one value from filtered as per criteria mentioned
@dougmphilly
@dougmphilly Жыл бұрын
Is this dynamic array functions only?
@alejandrovargasavila1870
@alejandrovargasavila1870 Жыл бұрын
Wow...🤯
@BhumitBhuva
@BhumitBhuva 8 ай бұрын
But in larger number of rows, it takes too much time to calculate, any alternate solution for this?
@EduardoGarcia-pl3gb
@EduardoGarcia-pl3gb Ай бұрын
@cheeseisclever
@cheeseisclever Жыл бұрын
Can I do this for cells which have been highlighted with conditional formatting? Multiple columns, with individual formulas for each column to identify entries not quite right/need checking for errors.
@sachinrv1
@sachinrv1 11 ай бұрын
One who has used the sumproduct can easily relate to this..
@mezza001
@mezza001 Жыл бұрын
what about the OR function when I replaced the '*" to '+"??
@hassan_a9
@hassan_a9 Жыл бұрын
Breaking bad cast haha
@shaibeezz
@shaibeezz 7 ай бұрын
I have a bit odd calculation requirement using the Filter function I have Employee Trip data - with Employee Code - Country Visit - Trip Value I need the only Employee with visited specification locations (e.g. USA & Canada) - the result should return the employee(s) who visited both countries
@johnmedlock2428
@johnmedlock2428 Жыл бұрын
When I have two excel spreadsheets open how do I prevent undoing information from the other sheet when making correction one?
@AlphaNumericNZ0
@AlphaNumericNZ0 Жыл бұрын
You have to open up different instances of excel. You will lose the ability to copy formulas or reference across workbooks, but it also limits what the undo undoes. ;)
@user-jy7gy9sx8t
@user-jy7gy9sx8t Жыл бұрын
No one struggles with this, i promise you, and this 'solution' is only for comparing two columns.
@redangrybird7564
@redangrybird7564 Жыл бұрын
Wouldn't be easier and less confusing if the developers have decided to use the "and" and "or" operators instead?
@nandakishore5325
@nandakishore5325 Жыл бұрын
😘😘😘❤️❤️❤️🙏🙏🙏
@ronaldinhogaucho5460
@ronaldinhogaucho5460 Жыл бұрын
Learned something new
@1707vivek
@1707vivek Жыл бұрын
You just saved my day. I was trying to find a solution for this for 5 hours. Just landed on this video by chance. Now I believe in God 😅
@LeilaGharani
@LeilaGharani Жыл бұрын
Great to hear - there is a long form version as well here: kzbin.info/www/bejne/Z56rcommqbp-d80
@randelianosantos717
@randelianosantos717 Жыл бұрын
cool
@vasipalle
@vasipalle Жыл бұрын
Omg Walter white yo
@jvd9202
@jvd9202 Жыл бұрын
My brain wants to equate (+) to "and".
@jorisvanh.9274
@jorisvanh.9274 10 ай бұрын
Does anyone know how to do this when you have not 1 or 2 criteria but 100+? Is there away to avoid having to do (...)*(...) this for all 100 of them?
@JosepPi
@JosepPi Жыл бұрын
or just use a pivot table... no?
@odinakaonuoha6971
@odinakaonuoha6971 Жыл бұрын
You are awesome ❤❤❤❤
@swarupghadei3590
@swarupghadei3590 Жыл бұрын
Hi I had a doubt which is slightly different from the topic covered here. How to paste values to a column where a filter is applied ?
@limstsusan2408
@limstsusan2408 Жыл бұрын
Unfiltered the column, then paste as value. After that filter again the column. Good luck to you.
@swarupghadei3590
@swarupghadei3590 Жыл бұрын
Hi ,thank you for your reply But I wanted to paste the values into the cells that are filtered. So the only option left for me is to take help of a lookup function I guess.
@keepsake029
@keepsake029 Жыл бұрын
May I please know which version of MS office are you using 🙏, cause my Excel doesn't seem to recognise these formulas to practice them in first place
@LeilaGharani
@LeilaGharani Жыл бұрын
Excel for Office 365. You can practice them if you setup a free Microsoft account and use Excel on the web.
@keepsake029
@keepsake029 Жыл бұрын
@@LeilaGharani thank you so much
@user-ej6rw2ke7n
@user-ej6rw2ke7n Жыл бұрын
Hi Leila , Hi to all followers, I need your help on smthg I am trying to setup I have a table with the following columns: Product, Month, Target I need to build a table showing monthly total target for a dynamic array of products (months in rows and total target figure based on one or more products listed in a table) Thnks for ur support
@iangunn49
@iangunn49 Жыл бұрын
Nice filter, I see what you did there...hehe
@user-cf2tb8my4x
@user-cf2tb8my4x 7 ай бұрын
I Dont want to filter but get unique. how?
@mahmoudch7628
@mahmoudch7628 Жыл бұрын
=AND(FILTER(1),FILTER(2))
@j.ballsdeep420
@j.ballsdeep420 Жыл бұрын
=IF(AND(FILTER(1),FILTER(2))="A",[@[Student]],"") Figured I'd finish you off
@ssaleem92
@ssaleem92 Жыл бұрын
If I wanted to display those results into one cell, could I use the TEXTJOIN function?
@LeilaGharani
@LeilaGharani Жыл бұрын
Yes 👍
@j.ballsdeep420
@j.ballsdeep420 Жыл бұрын
Oooooo, I think you might have landed on the quickest calculation method (run time for refreshing adding new data) I didn't even think of! Assuming it's on a table properly: =IF(TEXTJOIN([@[Geography]],[@[Chemistry]],TRUE,",")="A,A",[@[Student]],"") Damn. This is why I love Excel formulas (or logic for that matter) and brainstorming since there at easily over a dozen ways to do this but I think your idea would 100% be the fastest calculation time which actually does make a difference when you're dealing with 5 or 6 figure lines of data, let alone multiple other formulas that need to calculate or Queries/VBA scripts. Kudos to that unique idea!
@j.ballsdeep420
@j.ballsdeep420 Жыл бұрын
But either way to your question, yes, just add a new column to your table and use: =IF(RIGHT(TEXTJOIN([@[Student]]&(IF(XLOOKUP([@[Geography]],[@Chemistry]],[@[Chemistry]],"")="A"," - A","")),1)="","",IF(TEXTJOIN([@[Student]]&(IF(XLOOKUP([@[Geography]],[@Chemistry]],[@[Chemistry]],"")="A"," - A","")) That would result in the Student name - A, or: Jessie - A If you wanted to change the hyphen it's the very last formulas and results within quotation marks. The outside if statement checks if Student name - and is blank since it wasn't an A in both and returned blank would then just not return a response or be blank. Your quicker method would be PowerQuery
@johnmcho
@johnmcho Жыл бұрын
At some point its just easier to learn SQL
@adrianb3869
@adrianb3869 Жыл бұрын
It seems counterintuitive that PLUS is for the OR condition not the AND
@j.ballsdeep420
@j.ballsdeep420 Жыл бұрын
Why? & is literally the symbol used to calculate bringing two items together
@j.ballsdeep420
@j.ballsdeep420 Жыл бұрын
Either way CONCAT is the better way to combine, but you can also literally write out OR(a1,b1) and it will do or check, too, you'd just need to nest it within another if statement checking IF(....="TRUE",....)
@adrianb3869
@adrianb3869 Жыл бұрын
I guess because in maths x + y is equivalent to x AND y. Not a buggy j just find it odd.
@bmomosaik
@bmomosaik Жыл бұрын
and i use ChatGPT to get me the formula and in the next 3-4 years excel will have chatgpt built into it with microsofts multibillion dollar deal that they made with it and we no longer need youtube channels to help us with any more excel problems.
@Rajj20
@Rajj20 Жыл бұрын
jesse shud hv got F in chemistry and Walter A+
@jhonartcis8296
@jhonartcis8296 Жыл бұрын
id be careful in using this though, at 100k rows itll slow you computer down so much at itll run for at least 1 hr before it completes
@neevpatel3670
@neevpatel3670 Жыл бұрын
There no way Jesse was able pass either of the classes😡🤬
@alimarie260
@alimarie260 10 ай бұрын
I would honestly just put those two columns in alphabetical order…
@Rice0987
@Rice0987 Жыл бұрын
In some cases instead of asterisk works plus symbol.🤔
@LeilaGharani
@LeilaGharani Жыл бұрын
Yes 👍 that’s for OR condition. When both criteria are in the same column.
@Rice0987
@Rice0987 Жыл бұрын
@@LeilaGharani sometimes it works in different columns.🤗
@LeilaGharani
@LeilaGharani Жыл бұрын
@@Rice0987 Oh yes. True 🙌 When you're looking for either Column A or Column B
@azizurrehman6296
@azizurrehman6296 Жыл бұрын
Ms Leila i have humbally request to you..i need Ms 365 that you're using.. Just my biggest wishes...can you give me this setup in free please
@kickthesky
@kickthesky Жыл бұрын
Does this also work for conditionals for XLOOKUP functions as well or is it still better to precombine two candidate key fields together instead?
@j.ballsdeep420
@j.ballsdeep420 Жыл бұрын
You would have to nest you lookup in an if statement (or IFS if you had more than two) so technically you'd be doing the same thing but your calculation time would 100% be quicker, especially if it was on a table so: =IF(XLOOKUP([@[Chemistry]],[@[Geography]],[@[Geography]],"")="A",[@[Student]],"") Besides being able to shortcut fully writing the column header you also won't have to deal with a 3rd nested of IFERROR should you use absolute cell to column references and returns while avoiding getting NA
@markolar3161
@markolar3161 Жыл бұрын
Woah 😮
@josephdaquila2479
@josephdaquila2479 Жыл бұрын
Why are not just using and logic?
@AC_Blanco
@AC_Blanco Жыл бұрын
Perez is treading on thin ice with that pissy act he's doing
@user-ju1it8wf2j
@user-ju1it8wf2j Жыл бұрын
Thank you. For illiterates like me if(b2:b11 ="A", if(c2:c11="A",true,),)
@j.ballsdeep420
@j.ballsdeep420 Жыл бұрын
Um, no. That's a broken formula. You have if Chemistry = A, return Geography. That is all your formula would do. Should you really want to go that method you could put your formula within a 3rd if statement where if = "A" then return [@[Student]],""
@j.ballsdeep420
@j.ballsdeep420 Жыл бұрын
Assuming this was done on a table properly: =IF(([@[Chemistry]]&[@[Geography]])="A",[@[Sudent]],"") =IF(XLOOKUP([@[Chemistry]],[@[Geography]],[@[Geography]],"')"A","",[@[Student]]) Those would be my preferred method but to each their own and plenty of methods, probably over a dozen for this issue, I just like table references as you can shortcut after the [@[ and just a few letters of the header. Wish you normalize tables and table references so filling was a moot step for most. Maybe one day
@raghusoren9147
@raghusoren9147 9 ай бұрын
❡⭕⭕👌 ❤❤❤❤😢😂
@sachidanandkumar5626
@sachidanandkumar5626 Жыл бұрын
😊
@sachinrv1
@sachinrv1 Жыл бұрын
One who has used SUMPRODUCT, will get this fast. Thanks Leila :)
@sachidanandkumar5626
@sachidanandkumar5626 Жыл бұрын
😊
Excel FILTER Function - Lookup to Return Multiple Values
9:22
Leila Gharani
Рет қаралды 684 М.
Master the FILTER Formula in Excel (Beginner to Pro)
10:42
Kenji Explains
Рет қаралды 91 М.
СНЕЖКИ ЛЕТОМ?? #shorts
00:30
Паша Осадчий
Рет қаралды 7 МЛН
⬅️🤔➡️
00:31
Celine Dept
Рет қаралды 38 МЛН
1❤️#thankyou #shorts
00:21
あみか部
Рет қаралды 88 МЛН
Climbing to 18M Subscribers 🎉
00:32
Matt Larose
Рет қаралды 31 МЛН
How to Filter in Excel
16:22
Kevin Stratvert
Рет қаралды 413 М.
Rank by multiple criteria in Excel
5:04
Nazya M
Рет қаралды 18 М.
Make a Search Bar in Excel to Find Anything!
10:35
Kenji Explains
Рет қаралды 309 М.
VLOOKUP  vs XLOOKUP with Multiple Cell Criteria
9:05
Chester Tugwell
Рет қаралды 97 М.
I made a McKinsey Chart in Excel FASTER than coffee! Watch this.
10:38
Excel FILTER Function + Trick to Rearrange Column Order
10:17
MyOnlineTrainingHub
Рет қаралды 149 М.
СНЕЖКИ ЛЕТОМ?? #shorts
00:30
Паша Осадчий
Рет қаралды 7 МЛН