![]() |
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. |
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. |
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 |
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 |
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