ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

How to FILTER with Multiple Criteria in Excel

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 มี.ค. 2023
  • Join 400,000+ professionals in our courses: www.xelplus.co...
    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.co...
    🎬 LINK to more TH-cam Shorts videos: • Shorts (Tips, Tricks &...
    👕☕ Get the Official XelPlus MERCH: xelplus.creato...
    🎓 Not sure which of my Excel courses fits best for you? Take the quiz: www.xelplus.co...
    📚 Excel RESOURCES I Recommend: www.xelplus.co...
    🎥 GEAR I use: www.xelplus.co...
    More resources on my Amazon page: www.amazon.com...
    🚩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  ปีที่แล้ว +2

    📎More explanation and examples in this video: th-cam.com/video/1mHAVptUKAk/w-d-xo.html

    • @ranua9327
      @ranua9327 8 หลายเดือนก่อน

      I cannot use the link ☹️.
      Impossible to copy or click.

  • @joevano
    @joevano ปีที่แล้ว +89

    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 ปีที่แล้ว +7

      Thank you! I was just coming to the comments hoping for an explanation of this!

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว +16

      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 ปีที่แล้ว +1

      That was a very useful tip to remember!!! Thank you!

    • @brycejohansen7114
      @brycejohansen7114 ปีที่แล้ว +1

      The adding as an OR is a bit dodgy since two true return values added together is going to be two rather than one.

  • @dougidoug
    @dougidoug ปีที่แล้ว +12

    Of course Walter gets an A in chemistry. After all he is the best cook.

    • @a.saddama.hafeez8518
      @a.saddama.hafeez8518 ปีที่แล้ว +1

      Underrated and unexpected comment

    • @dougidoug
      @dougidoug ปีที่แล้ว +1

      Well you do try. Some people are just not that observant.

  • @terdik36
    @terdik36 ปีที่แล้ว +41

    are those breaking bad characters? 💀

    • @infallibleblue
      @infallibleblue ปีที่แล้ว +2

      Omg I thought it was such particular names

  • @excelenko
    @excelenko ปีที่แล้ว +3

    I always use + and * instead of "AND" "OR" - works fine!

  • @Slyh01
    @Slyh01 ปีที่แล้ว +5

    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

  • @Envy_Alvin
    @Envy_Alvin ปีที่แล้ว +3

    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?

  • @Зле_Коте
    @Зле_Коте 6 หลายเดือนก่อน

    Thank you! very fast explanation

  • @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

  • @armin0815
    @armin0815 8 หลายเดือนก่อน

    I typically compare the concatenated string - using the function or & but I guess this is more elegant. 😊

  • @krishnatate4765
    @krishnatate4765 ปีที่แล้ว +2

    Thx for information *,+

  • @justinriehl4183
    @justinriehl4183 ปีที่แล้ว +2

    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

  • @amila247
    @amila247 ปีที่แล้ว

    Thanks !!!

  • @CallumPooleProgrammer
    @CallumPooleProgrammer ปีที่แล้ว +24

    Or in SQL:
    SELECT Student FROM Table WHERE chemistry='A' AND geography='A'

    • @Dxgreen
      @Dxgreen ปีที่แล้ว +1

      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 ปีที่แล้ว

      i think excel is better

  • @tikooashish
    @tikooashish ปีที่แล้ว +1

    Awesome, thanks for tip

  • @travisos7199
    @travisos7199 3 หลายเดือนก่อน

    Thank you very much, i needed this video 🙏

  • @annog6673
    @annog6673 ปีที่แล้ว +3

    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  ปีที่แล้ว +3

      Yes. I’ll cover that in a longer video version 🙌

    • @annog6673
      @annog6673 ปีที่แล้ว +2

      @@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)

  • @mulisaurus
    @mulisaurus ปีที่แล้ว

    This is great...I use another way of incorporating Index Match but this seems slightly more simple to use.

  • @eslamfahmy87
    @eslamfahmy87 ปีที่แล้ว

    Excel by the easiest instructor

  • @themadhiker
    @themadhiker 8 หลายเดือนก่อน

    You’ve literally just saved my life with this 🤣

  • @jayeshdhuri8125
    @jayeshdhuri8125 4 หลายเดือนก่อน

    How to display data from two different sheets using filter function specifically when the condition is " or " either in 1 sheet or second sheet

  • @abdulrahmanmuslih141
    @abdulrahmanmuslih141 ปีที่แล้ว

    Thanks

  • @NaftuliSinger
    @NaftuliSinger ปีที่แล้ว

    That's so helpful.

  • @flipsspillow
    @flipsspillow ปีที่แล้ว

    Danke Oida! Voll hilfreich! :D

  • @bluza451
    @bluza451 ปีที่แล้ว

    Thank you!

  • @krishnatate4765
    @krishnatate4765 11 หลายเดือนก่อน

    Excellent ma'am 😊

  • @sidahmedbensaad1838
    @sidahmedbensaad1838 8 หลายเดือนก่อน

    Thanks Leila

  • @prathameshbile5865
    @prathameshbile5865 ปีที่แล้ว

    Thank You! ❣️

  • @hemvaidya
    @hemvaidya ปีที่แล้ว

    VERY VERY USEFUL

  • @storywha2011
    @storywha2011 ปีที่แล้ว +1

    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?

  • @alihms
    @alihms ปีที่แล้ว +4

    Was excited for this info. Only to realise my work pc is still on Excel 2016 :-(

    • @gorflunk
      @gorflunk ปีที่แล้ว +1

      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.

  • @kenfischer8447
    @kenfischer8447 ปีที่แล้ว

    You could have used the AND function, correct?

  • @BenDieselBasicAutomotive
    @BenDieselBasicAutomotive ปีที่แล้ว

    Thank you again, Mam....

  • @user-jy7gy9sx8t
    @user-jy7gy9sx8t ปีที่แล้ว

    No one struggles with this, i promise you, and this 'solution' is only for comparing two columns.

  • @theworldbroker
    @theworldbroker ปีที่แล้ว

    give more about connecting multiple tables in one slicer.

  • @shaibeezz
    @shaibeezz 9 หลายเดือนก่อน

    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

  • @redangrybird7564
    @redangrybird7564 ปีที่แล้ว

    Wouldn't be easier and less confusing if the developers have decided to use the "and" and "or" operators instead?

  • @Dulitzlives
    @Dulitzlives ปีที่แล้ว

    Excellent

  • @odinakaonuoha6971
    @odinakaonuoha6971 ปีที่แล้ว

    You are awesome ❤❤❤❤

  • @M.A.007
    @M.A.007 ปีที่แล้ว

    دمت گرم. 👍🏻

  • @hawrehawre3216
    @hawrehawre3216 ปีที่แล้ว

    LOVE YOUUUUUUU

  • @johnmedlock2428
    @johnmedlock2428 ปีที่แล้ว +1

    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. ;)

  • @archieb1196
    @archieb1196 ปีที่แล้ว +1

    how can we use NOT as a criterion?

  • @BudiBudi-tx9md
    @BudiBudi-tx9md ปีที่แล้ว

    Does this completely replaces the AND( ) or the OR ( ) formula?

  • @user-hf9hn2jf6e
    @user-hf9hn2jf6e 10 หลายเดือนก่อน

    How choose only one value from filtered as per criteria mentioned

  • @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: th-cam.com/video/1mHAVptUKAk/w-d-xo.html

  • @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.

  • @BhumitBhuva
    @BhumitBhuva 9 หลายเดือนก่อน

    But in larger number of rows, it takes too much time to calculate, any alternate solution for this?

  • @lydethful
    @lydethful ปีที่แล้ว

    How about both AND and OR?

  • @sgallegos702
    @sgallegos702 ปีที่แล้ว +1

    How do you get excel to highlight or filter cells with the same name? I.e. Disney on page 1, page 2.

  • @mezza001
    @mezza001 ปีที่แล้ว

    what about the OR function when I replaced the '*" to '+"??

  • @adin6429
    @adin6429 ปีที่แล้ว

    Is there any way to have array criteria in the filter function?

  • @sachinrv1
    @sachinrv1 ปีที่แล้ว

    One who has used the sumproduct can easily relate to this..

  • @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.

  • @jorisvanh.9274
    @jorisvanh.9274 ปีที่แล้ว

    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?

  • @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

  • @hassan_a9
    @hassan_a9 ปีที่แล้ว

    Breaking bad cast haha

  • @siyabulelatshali1012
    @siyabulelatshali1012 ปีที่แล้ว

    Dope 👍.

  • @dougmphilly
    @dougmphilly ปีที่แล้ว

    Is this dynamic array functions only?

  • @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  ปีที่แล้ว +1

      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

  • @vasipalle
    @vasipalle ปีที่แล้ว

    Omg Walter white yo

  • @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

  • @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.

  • @JosepPi
    @JosepPi ปีที่แล้ว +1

    or just use a pivot table... no?

  • @ssaleem92
    @ssaleem92 ปีที่แล้ว

    If I wanted to display those results into one cell, could I use the TEXTJOIN function?

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว +1

      Yes 👍

    • @j.ballsdeep420
      @j.ballsdeep420 ปีที่แล้ว +1

      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

  • @alejandrovargasavila1870
    @alejandrovargasavila1870 ปีที่แล้ว

    Wow...🤯

  • @jvd9202
    @jvd9202 ปีที่แล้ว

    My brain wants to equate (+) to "and".

  • @user-cf2tb8my4x
    @user-cf2tb8my4x 9 หลายเดือนก่อน

    I Dont want to filter but get unique. how?

  • @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.

  • @EduardoGarcia-pl3gb
    @EduardoGarcia-pl3gb 3 หลายเดือนก่อน

  • @ronaldinhogaucho5460
    @ronaldinhogaucho5460 ปีที่แล้ว

    Learned something new

  • @iangunn49
    @iangunn49 ปีที่แล้ว

    Nice filter, I see what you did there...hehe

  • @Rajj20
    @Rajj20 ปีที่แล้ว

    jesse shud hv got F in chemistry and Walter A+

  • @johnmcho
    @johnmcho ปีที่แล้ว

    At some point its just easier to learn SQL

  • @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

  • @randelianosantos717
    @randelianosantos717 ปีที่แล้ว

    cool

  • @nandakishore5325
    @nandakishore5325 ปีที่แล้ว +1

    😘😘😘❤️❤️❤️🙏🙏🙏

  • @Rice0987
    @Rice0987 ปีที่แล้ว

    In some cases instead of asterisk works plus symbol.🤔

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว +1

      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

  • @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

  • @alimarie260
    @alimarie260 ปีที่แล้ว

    I would honestly just put those two columns in alphabetical order…

  • @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

  • @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

  • @neevpatel3670
    @neevpatel3670 ปีที่แล้ว

    There no way Jesse was able pass either of the classes😡🤬

  • @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

  • @sachinrv1
    @sachinrv1 ปีที่แล้ว

    One who has used SUMPRODUCT, will get this fast. Thanks Leila :)

  • @மின்விரிதாள்_விரிப்போம்_வாங்க

    Thank you. For illiterates like me if(b2:b11 ="A", if(c2:c11="A",true,),)

    • @j.ballsdeep420
      @j.ballsdeep420 ปีที่แล้ว +2

      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]],""

  • @raghusoren9147
    @raghusoren9147 11 หลายเดือนก่อน

    ❡⭕⭕👌 ❤❤❤❤😢😂

  • @markolar3161
    @markolar3161 ปีที่แล้ว

    Woah 😮

  • @sachidanandkumar5626
    @sachidanandkumar5626 ปีที่แล้ว

    😊

  • @sachidanandkumar5626
    @sachidanandkumar5626 ปีที่แล้ว

    😊