lookup text in one column, count in another column

G

Guest

I want to look up "DSC" in column BH, then I want to count different values
in column AC, but I only want to count the occurences of value in column AC,
if "DSC" occurs in column BH.

I tried =if(vlookup(bh8:bh550,"dsc),(countif(AC8:AC650,"X"))

I've tried everything at this point.

If BH8:BH550 is "DSC", then count AC8:AC550,"X"

There are different values in both columns and I need a formula to perform
this function based on the "DSC" and "X" criteria, which may change to
something like "KLK" and "S".

HELP!!!
 
G

Guest

Try using SUMPRODUCT:

=SUMPRODUCT(--(BH8:BH550="DSC"),--(AC8:AC550="X"))

You could also replace "DSC" and "X" with cell references, like:

=SUMPRODUCT(--(BH8:BH550=A1),--(AC8:AC550=B1))

Then type in the values you wish to match in cells A1 and B1

HTH,
Elkar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top