Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DaveF2002
 
Posts: n/a
Default Using ADD function within DCOUNT criteria

I am trying to use a DCOUNT function, and need to have two criteria. How do
I use the AND function within the criteria?

I can do it using one criteria at a time, but when I use AND to use two
criteria, I get an error.

What sytax do I use?

Many thanks
  #2   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Dave,

I don't think you can, unless you set up a helper column that has your
conditions, then use that in your DCOUNT function. Something like:
=AND(A20, A2<100, B2 = "Normal").
This one's for A2 values between 0 and 100, and B2 contains the word Normal.

Or use SUMPRODUCT instead:
=SUMPRODUCT( (A2:A100 0) * (A2:A100 < 100) * (B2:B100 = "Normal) )

--
Earl Kiosterud
www.smokeylake.com/

Off-topic: There's a hilarious comedy act by Men in Coats at
http://www.koreus.com/files/200505/men-in-coats.html. You gotta see this.
I had to share with all.

-------------------------------------------

"DaveF2002" wrote in message
...
I am trying to use a DCOUNT function, and need to have two criteria. How
do
I use the AND function within the criteria?

I can do it using one criteria at a time, but when I use AND to use two
criteria, I get an error.

What sytax do I use?

Many thanks



  #3   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

You can use two columns in the criteria area, similar to the advanced
filter criteria area shown he

http://www.contextures.com/xladvfilter01.html#Criteria

DaveF2002 wrote:
I am trying to use a DCOUNT function, and need to have two criteria. How do
I use the AND function within the criteria?

I can do it using one criteria at a time, but when I use AND to use two
criteria, I get an error.

What sytax do I use?

Many thanks



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #4   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Dave,

Oops. Cancel the "I don't think you can." I read your post as using
COUNTIF, not DCOUNT. I think I'll go back to painting the guest room now.
--
Earl Kiosterud
www.smokeylake.com/
-------------------------------------------

"Earl Kiosterud" wrote in message
...
Dave,

I don't think you can, unless you set up a helper column that has your
conditions, then use that in your DCOUNT function. Something like:
=AND(A20, A2<100, B2 = "Normal").
This one's for A2 values between 0 and 100, and B2 contains the word
Normal.

Or use SUMPRODUCT instead:
=SUMPRODUCT( (A2:A100 0) * (A2:A100 < 100) * (B2:B100 = "Normal) )

--
Earl Kiosterud
www.smokeylake.com/

Off-topic: There's a hilarious comedy act by Men in Coats at
http://www.koreus.com/files/200505/men-in-coats.html. You gotta see this.
I had to share with all.

-------------------------------------------

"DaveF2002" wrote in message
...
I am trying to use a DCOUNT function, and need to have two criteria. How
do
I use the AND function within the criteria?

I can do it using one criteria at a time, but when I use AND to use two
criteria, I get an error.

What sytax do I use?

Many thanks





  #5   Report Post  
Davef2002
 
Posts: n/a
Default

I have managed it. In the criteria range, you have to have the two columns
side by side and select both as one range, (without trying to use AND). If
you try using the AND function and the columns are separated, it just does
not work.

Thanks for your help anyway.

DaveF

"Debra Dalgleish" wrote:

You can use two columns in the criteria area, similar to the advanced
filter criteria area shown he

http://www.contextures.com/xladvfilter01.html#Criteria

DaveF2002 wrote:
I am trying to use a DCOUNT function, and need to have two criteria. How do
I use the AND function within the criteria?

I can do it using one criteria at a time, but when I use AND to use two
criteria, I get an error.

What sytax do I use?

Many thanks



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


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
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
If function using a list of criteria arran1180 Excel Discussion (Misc queries) 1 February 17th 05 05:31 PM
Can I use a cell reference in the criteria for the sumif function. Number Cruncher Excel Worksheet Functions 2 November 4th 04 08:52 PM


All times are GMT +1. The time now is 10:47 PM.

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"