Home > other >  Excel Combining Countif and Vlookup
Excel Combining Countif and Vlookup

Time:12-14

Table 1 (input):

Name Value
Bob 0.5
John 1.2
Bob 0.3
John 0.1
Jane 3

Table 2 (expected output):

Name >=0 & <1 Count
Bob 2
John 1
Jane 0

I'm looking to count the names in Table2 (column A) every instance in which the name appears in Table1 but only if their value columns in Table1 is between 0 and 1.

I'm assuming I have to combine VLOOKUP with COUNTIFS but I am not sure.. Nothing works..

NOTE: PivotTables are not an option, Table2 column B must have the right formula to count these instances with the two criteria applied. Likely ">="&0 and "<="&1 should be present in the formula.

Thank you for your help!

CodePudding user response:

Just COUNTIFS:

=COUNTIFS(A:A,D2,B:B,">=0",B:B,"<1")

enter image description here

  • Related