I want to be able to determine how many times a person's particular ID (e.g.
#123) has appeared in a separate column (e.g.
column C) given a name (e.g.
- Let column A consist of several names. (
- Let column B consist of IDs relating to the person's name. (
- Let column C consist of those same IDs, however it may contain duplicates of the IDs (might have three
The IDs are side-by-side with each person's respective name.
How can I use the result of a
VLOOKUP as the criteria (second argument) of the
If I use
VLOOKUP separately it returns the correct value that I'm trying to count.
=VLOOKUP(Bob, column A:column B, 2, FALSE) will return
If I use
COUNTIF separately it returns the correct count value as well.
=COUNTIF(column C, #123) will return
=COUNTIF(column C, VLOOKUP(Bob, column A:column B, 2, FALSE)) but it returns
I've tried referring the criteria for
COUNTIF to a separate cell with the
VLOOKUP formula but it still returns
So it seems like it stops working when I combine the two together. What might the problem be, and what might be an alternative?