Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rob Rob is offline
external usenet poster
 
Posts: 718
Default strings as criteria in database function DCOUNT

I have a problem with using strings as criteria in the database function
DCOUNT. If I use a criterium such as "loc1", it counts all the locations
starting with "loc1", so also "loc10", "loc1b" "loc11". For example:
=dcount(database;criteria) return 3, where it would like it to return 1

criteria:
location name
loc1 a

database:
location name
loc1 a
loc10 a
loc10 a

I know i could prevent it by using loc01, but i would like to know if there
is a button or switch somewhere that also does the trick. And does anyone
know if this function perforedm differently in older version of excel?
(pre-2000)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default strings as criteria in database function DCOUNT

Use this instead of

loc1

="=loc1"


will return 1


--


Regards,


Peo Sjoblom



"Rob" wrote in message
...
I have a problem with using strings as criteria in the database function
DCOUNT. If I use a criterium such as "loc1", it counts all the locations
starting with "loc1", so also "loc10", "loc1b" "loc11". For example:
=dcount(database;criteria) return 3, where it would like it to return 1

criteria:
location name
loc1 a

database:
location name
loc1 a
loc10 a
loc10 a

I know i could prevent it by using loc01, but i would like to know if
there
is a button or switch somewhere that also does the trick. And does anyone
know if this function perforedm differently in older version of excel?
(pre-2000)



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rob Rob is offline
external usenet poster
 
Posts: 718
Default strings as criteria in database function DCOUNT

Thanks! (why didn't I think of that)

Regards,

"Peo Sjoblom" wrote:

Use this instead of

loc1

="=loc1"


will return 1


--


Regards,


Peo Sjoblom



"Rob" wrote in message
...
I have a problem with using strings as criteria in the database function
DCOUNT. If I use a criterium such as "loc1", it counts all the locations
starting with "loc1", so also "loc10", "loc1b" "loc11". For example:
=dcount(database;criteria) return 3, where it would like it to return 1

criteria:
location name
loc1 a

database:
location name
loc1 a
loc10 a
loc10 a

I know i could prevent it by using loc01, but i would like to know if
there
is a button or switch somewhere that also does the trick. And does anyone
know if this function perforedm differently in older version of excel?
(pre-2000)




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
Database Function Criteria Boolean Operations ampozdol Excel Worksheet Functions 4 August 18th 06 10:40 PM
Database function criteria Maistrye Excel Worksheet Functions 0 July 5th 06 09:57 PM
DCOUNT to Return Values from Access database Tim H Excel Discussion (Misc queries) 5 December 15th 05 10:27 PM
Using ADD function within DCOUNT criteria DaveF2002 Excel Discussion (Misc queries) 4 June 19th 05 09:48 PM
Function that filters a list (Database) for criteria in a range a. FirstVette52 Excel Worksheet Functions 0 February 8th 05 04:37 PM


All times are GMT +1. The time now is 12:33 AM.

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

About Us

"It's about Microsoft Excel"