DSUM Criteria HELP

  • Thread starter Thread starter chunkylover57
  • Start date Start date
C

chunkylover57

I have been using this code in 123
@DSUM($Sheet1,"Jan",NAME=$A1)

Basicilly it went thu the Jan Column and looked for Name = A1 and added
this up...


THis is what I have for excel...
=DSUM(A1:C5,"Jan",A1:A6=D15)

Im getting an error on criteria, when I remove the =D15 it works but
returns a total for the entire colum A1-A6
 
Hi

you have to enter a criteria range as third parameter of DSUM. You
cannot enter a search criteria directly (have a look at the Excel help
file). Another solution could be the use of SUMPRODUCT or SUMIF
For your example you could use:
=SUMIF($A$1:$A$6,D15,$B$1:$B$6)
assuming that B is the 'Jan' column
or
=SUMPRODUCT(($A$1:$A$6=D15)*($B$1:$B$6))

HTH
Frank
 
You will find that Excel is different to 123 because Criteria has to be
a *range of cells* at least 2 rows high with the field name at the top
and criteria below. So at least 2 cells.

It looks like the function you need is SUMIF() - perhaps this in your
case :-
=SUMIF(A1:C5,D15,C2:C5)

Please see DSUM, "Database Functions", and SUMIF in Excel help.
 
Back
Top