Criteria Range at two different places

A

a94andwi

Hello.

I have a problem that I can not figure out how to handle.

I have this DCOUNT function: =DCOUNT(Database;DATA!$L$10;(B79:B80))

It works but now I want to add another criteria range at another plac
in my workbook.

I try to do it like this
=DCOUNT(Database;DATA!$L$10;(B79:B80;A107:A108))
but it does say #Value!. What can be wrong.
The two criteria ranges are B79:B80 and A107:A108.
How can I change the above function so that I allso take A107:A108 i
concideration?

I hope I have contributet enough information but if I have forgotte
something, please ask and I will give it to you.

/Ander
 
G

Guest

With DCOUNT you can not split up your criteria in non-adjacent ranges. They
have to be next to each other. If you criteria must be plit up into
non-adjacent ranges I would suggest using the SUMPRODUCT function to
accomplish your task.

=SUMPRODUCT(--firstrange=firstcriteria),--(secondrange=secondcriteria))

The trues will turn into 1's and the fales to 0's. If both first and second
is true the formula will multiply 1 * 1 which equals 1. It will then add up
all the ones to give you a count.

Play around with the function, Excel help, and posts regarding SUMPRODUCT
and you will find what you need.

Hope this helps.

Thanks,
Bill Horton
 

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