Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MJP MJP is offline
external usenet poster
 
Posts: 2
Default DCOUNT function not working properly on string comparisons

I have a worksheet that contains some raw data. In nne of the columns of raw
data (let's call it "Code") all of the values are formatted as text. Some
example values in this column a K4, K5, 11, K9. In another worksheet I
have a series of DCOUNT functions that perform counts on the raw data based
on different criteria. One such function counts rows that do not have a
"Code" of 11 or K5. So the DCOUNT criteria looks like:

Code
<11

Code
<K5

You get the idea. Problem is it is not filtering out the Codes of 11
because they are formatted as strings (i.e. '11). It is not an option to
format them as numbers.

Weird thing is that =11 works just fine. I also got an answer from someone
saying to include the column header in the 2nd cell of criteria like so:

<blank cell
Code<11

Code
<K5

This works, but is not acceptable because the users of the workbook need to
be able to easily modify criteria to change counts and this confuses that
process. Is there any way to get this to work using the normal DCOUNT
criteria format?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default DCOUNT function not working properly on string comparisons

Hi

Try making your test
CODE<"11"

--
Regards

Roger Govier


"MJP" wrote in message
...
I have a worksheet that contains some raw data. In nne of the columns
of raw
data (let's call it "Code") all of the values are formatted as text.
Some
example values in this column a K4, K5, 11, K9. In another
worksheet I
have a series of DCOUNT functions that perform counts on the raw data
based
on different criteria. One such function counts rows that do not have
a
"Code" of 11 or K5. So the DCOUNT criteria looks like:

Code
<11

Code
<K5

You get the idea. Problem is it is not filtering out the Codes of 11
because they are formatted as strings (i.e. '11). It is not an option
to
format them as numbers.

Weird thing is that =11 works just fine. I also got an answer from
someone
saying to include the column header in the 2nd cell of criteria like
so:

<blank cell
Code<11

Code
<K5

This works, but is not acceptable because the users of the workbook
need to
be able to easily modify criteria to change counts and this confuses
that
process. Is there any way to get this to work using the normal DCOUNT
criteria format?



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
Hyperlink function not working properly NB Excel Worksheet Functions 0 January 12th 07 06:18 PM
But not working properly Rao Ratan Singh Excel Discussion (Misc queries) 2 September 14th 06 08:45 AM
DCount?? not working. Pls help KDD Excel Discussion (Misc queries) 3 August 29th 05 04:17 PM
string comparisons Ron Excel Discussion (Misc queries) 0 February 17th 05 05:02 PM
Replace function not working properly in Excel 2000 SP3 rgbytg Excel Worksheet Functions 5 November 11th 04 03:44 PM


All times are GMT +1. The time now is 02:55 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"