Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
a94andwi
 
Posts: n/a
Default Criteria Range at two different places


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 place
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 in
concideration?

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

/Anders


--
a94andwi
------------------------------------------------------------------------
a94andwi's Profile: http://www.excelforum.com/member.php...o&userid=21077
View this thread: http://www.excelforum.com/showthread...hreadid=534945

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
William Horton
 
Posts: n/a
Default Criteria Range at two different places

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

"a94andwi" wrote:


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 place
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 in
concideration?

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

/Anders


--
a94andwi
------------------------------------------------------------------------
a94andwi's Profile: http://www.excelforum.com/member.php...o&userid=21077
View this thread: http://www.excelforum.com/showthread...hreadid=534945


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Array to named range conversion... i-Zapp Excel Discussion (Misc queries) 4 October 25th 05 09:09 PM
sumif when criteria is a range jeremy via OfficeKB.com Excel Discussion (Misc queries) 7 August 15th 05 05:49 PM
Sum range of values that meet date criteria Ed Wurster Excel Discussion (Misc queries) 2 April 11th 05 08:06 PM
Specify a null value in an Excel Database criteria range Johnnyy2k Excel Worksheet Functions 2 December 28th 04 04:43 PM
can I use a range of dates as a criteria when using sumif? D@annyBoy Excel Worksheet Functions 5 December 2nd 04 01:37 PM


All times are GMT +1. The time now is 08:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"