countif question

  • Thread starter Thread starter carl
  • Start date Start date
C

carl

I have a table:

BOB 1 2 3
JIM 1 2
SAM 1 1 1

I would like to create a Countif formula that will
produce the following table...

ALEX 0
BOB 3
CHUCK 0
JIM 2
SAM 3

Thank you in advance.
 
Let A2:D4 house the data sample you provided.

Assuming that you have ALEX in G2, BOB in G3, etc...

In H2 enter & copy down:

=IF(ISNUMBER(I2),COUNT(INDEX($B$2:$D$4,I2,0)),0)

In I2 enter & copy down:

=MATCH(G2,$A$2:$A$4,0)
 
Back
Top