Forum Discussion

Lawrence_Lam_320's avatar
Lawrence_Lam_320
Copper Contributor
Jul 19, 2023
Solved

How to use count unique by using filter under multiple criteria from different colume

Hi all expertises, 

Last time, I learnt the following formula to count the unique by using filter under single criteria.

Formula is =count(unique(filter(A:A, B:B="correct"). The formula is correct and I can get the correct answer.

 

Now, I need to count the unique again but under multiple criterias from different columes. May I ask your help again? thanks

4 Replies

  • SehrishFaiz8's avatar
    SehrishFaiz8
    Occasional Reader

    HansVogelaarHi, 
    I have used this formula. It works and counts unique value against critieria. However, if criteria one of the criteria doesn't match it gives 1 as value instead of 0. Could you please guide what error I am making?

    • HansVogelaar's avatar
      HansVogelaar
      MVP

      The error is in my formula, Change it to

      =IF(COUNTIFS(B:B, "correct", C:C, 37, D:D, ">25")=0, 0, COUNTA(UNIQUE(FILTER(A:A, (B:B="correct")*(C:C=37)*(D:D>25)))))

    • Lawrence_Lam_320's avatar
      Lawrence_Lam_320
      Copper Contributor
      HI Hans, thank you so so much. I got the correct answer. Use * ( ) to add additional criteria. Thanks for your great help

Resources