DCOUNT returns the "wrong" number (maybe)

D

dh13134

i'm using DCOUNT to count the number of stock tickers in a list that
meet my criteria. the problem is, my criteria says to count tickers "A,
BA CD and DE" for example, which should return a count of 4. but my
list contains "A,AA,BA,BAC,CD,CDI,DE,DET, and DCOUNT returns 8. is this
the way DCOUNT works? if i had AXY and AYZ in my list, DCOUNT would
count those too. how can i get the answer i want (4)?
 
W

willwonka

Unfortunately, that is the way DCOUNT works.

You could use an array formula.

Let's say your list has a range name of data.
Your criteria has a range name of crit

You could use this array formula =SUM(COUNTIF(data,crit)). You will
need to hit ctrl-shift-enter to make it an array formula so the formula
will now actually look like:

{=SUM(COUNTIF(data,crit))}
 

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