ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   dcount question (https://www.excelbanter.com/excel-discussion-misc-queries/127884-dcount-question.html)

chadwick

dcount question
 
Hi all - a simple question (I think).

I'm trying to use the DCount function to count all records for which
the "Completion Date" field is NOT "TBD." I can easily count all
records whose dates are "TBD," or any specific date, eg "9/15/2002," by
simply entering that info in the criteria field that I'm referencing.
Can anyone tell me how to enter a NOT criterion?

As always, all help is greatly appreciated. Thanks.


KC Rippstein hotmail com>

dcount question
 
Just use <
For example, in G1 put Completion Date and in G2 put <TBD
Then in your DCOUNT formula, the criteria is simply G1:G2
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"chadwick" wrote:

Hi all - a simple question (I think).

I'm trying to use the DCount function to count all records for which
the "Completion Date" field is NOT "TBD." I can easily count all
records whose dates are "TBD," or any specific date, eg "9/15/2002," by
simply entering that info in the criteria field that I'm referencing.
Can anyone tell me how to enter a NOT criterion?

As always, all help is greatly appreciated. Thanks.



Dave Peterson

dcount question
 
Maybe you could use =countif() instead:

=countif(a1:a10,"<"&"tbd")



chadwick wrote:

Hi all - a simple question (I think).

I'm trying to use the DCount function to count all records for which
the "Completion Date" field is NOT "TBD." I can easily count all
records whose dates are "TBD," or any specific date, eg "9/15/2002," by
simply entering that info in the criteria field that I'm referencing.
Can anyone tell me how to enter a NOT criterion?

As always, all help is greatly appreciated. Thanks.


--

Dave Peterson

Earl Kiosterud

dcount question
 
Dave,

Oddly, "<tbd" works too, though yours seems more sensible.

Countif has a strange set of rules, and also doesn't follow the ASCII code
value strictly when doing < or operations. COUNTIF(a1:a10, tbd) should
fail with a name error, but doesn't. Doesn't work either.
--
Earl Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
"Dave Peterson" wrote in message
...
Maybe you could use =countif() instead:

=countif(a1:a10,"<"&"tbd")



chadwick wrote:

Hi all - a simple question (I think).

I'm trying to use the DCount function to count all records for which
the "Completion Date" field is NOT "TBD." I can easily count all
records whose dates are "TBD," or any specific date, eg "9/15/2002," by
simply entering that info in the criteria field that I'm referencing.
Can anyone tell me how to enter a NOT criterion?

As always, all help is greatly appreciated. Thanks.


--

Dave Peterson




Dave Peterson

dcount question
 
"<"&"tbd" will evaluate to "<tbd", but I like

=countif(a1:a10,"<"&"tbd")
so that if you want to point at a cell that contained TBD, it looks like it
would be easier to fix:

=countif(a1:a10,"<"&a1)



Earl Kiosterud wrote:

Dave,

Oddly, "<tbd" works too, though yours seems more sensible.

Countif has a strange set of rules, and also doesn't follow the ASCII code
value strictly when doing < or operations. COUNTIF(a1:a10, tbd) should
fail with a name error, but doesn't. Doesn't work either.
--
Earl Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
"Dave Peterson" wrote in message
...
Maybe you could use =countif() instead:

=countif(a1:a10,"<"&"tbd")



chadwick wrote:

Hi all - a simple question (I think).

I'm trying to use the DCount function to count all records for which
the "Completion Date" field is NOT "TBD." I can easily count all
records whose dates are "TBD," or any specific date, eg "9/15/2002," by
simply entering that info in the criteria field that I'm referencing.
Can anyone tell me how to enter a NOT criterion?

As always, all help is greatly appreciated. Thanks.


--

Dave Peterson


--

Dave Peterson


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com