0

I have two tables in Excel each with a column for a unique ID value (i.e., alphanumeric). Each table also has other columns with either string or numeric values. Is it possible to do the following in a single formula:

  1. Find/Match the ID values from one table with the ID values from the other table
  2. Return a count of the matching cases based on multiple criteria from other columns in each of the tables

As an example (see below), I would like to find the matching ID values from Table 1 with the ID values in Table 2 then return a count of the matches with a Gender value of 0 and a Satisfaction value of 4. In this case, the returned value would be 2. I know VLOOKUP or Index Match could be used to merge the tables based on the ID values then COUNTIFS for the count, but would like to do this in a single formula if possible.

Table 1
ID   Gender
b2   0
c3   0
d4   0
e5   1
f7   1
g8   1
h9   1
i10  1
Table 2
ID   Satisfaction
a1   5
b2   4
c3   4
d4   3
e5   4
f7   3
g8   2
Output
Count of gender = 0 and satisfaction = 4: 2

These are just examples of my actual tables, so it is important to note that the actual tables have different numbers of rows and may have missing values in case that matters.

1 Answer 1

0

Use sumproduct that iterates the range in table 1:

=SUMPRODUCT((COUNTIFS(E:E,A2:A9,F:F,4))*(B2:B9=0))

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .