DSum with 2 “<>” criteria

Lmens

Registered User.
Local time
Today, 14:45
Joined
Jul 19, 2010
Messages
26
Please, can some one please tell me what’s wrong with my DSum function?

=DSum("[AprilVCOS]","VCOSmaster","[D_Level]<>'H.SCOTT'AND 'SurtiVacCalaDB'”) -- this excludes “H.Scott” but includes “SurtiVacCalaDB”

=DSum("[AprilVCOS]","VCOSmaster","[D_Level]<>'H.SCOTT'AND <> 'SurtiVacCalaDB'") –This retures “#Error”

What I want is the sum of all but 'H.SCOTT' and ‘SurtiVacCalaDB’

Always with much appreciation!
 
Code:
=DSum("[AprilVCOS]","VCOSmaster","[D_Level] <> 'H.SCOTT' AND [D_Level] <> 'SurtiVacCalaDB'")
 
Thank you!!
 
An alternative method which works well with more values but can work with even one is:
Code:
=DSum("[AprilVCOS]","VCOSmaster","[D_Level] Not In('H.SCOTT','SurtiVacCalaDB')")
Which makes it shorter since you don't have to repeat the field name for each value.
 
Yeah, that's even tidier. Thanks Bob.
 

Users who are viewing this thread

Back
Top Bottom