Database function criteria

G

Guest

I am using DGET and DSUM in a data table to return data from a long list. All
works fine, except that DGET returns NUM! errors for some fields because it
is trying to return 2 values rather than one unique value. This is because it
seems not to distinguish between my criteria. For example, it thinks that
line items 'Depreciation' and 'DEPRECIATIONS' are the same. The Excel help
mentions that the functions are not case sensitive, but even correcting for
the case of the criteria, I have some that DGET thinks are the same.

Does anyone know the exact behaviour of the database functions when they
read criteria - do they only use the first 12 digits of any criterion to do
the search, for example?

Thanks,

SB
 
E

Electra

the book I have says you get a #NUM error when you pass a
non-numerical argument to a function when a number is expect or you
pass an invalid argument to a function for example: sqrt(-1). the
book also says that for DGET you MUST specify a condition that will
return a single value. this is not case sensitive unless you are
using it in combo with something like the the exact function.
 
G

Guest

Thanks. I've since found elsewhere that the default behaviour of DGET, DSUM
etc is to assume that you want find a match for records that *begin* with the
criteria you specify, rather than do an exact match. this strikes me as a
little dangerous, but there you go....

My criteria are now all specified to match exactly using the weird
="criterion" syntax.

SB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top