Microsoft KB Archive/60993

{| = Using DSUM Function on Multiple Fields Using Arrays =
 * width="100%"|

Last reviewed: November 4, 1994

Article ID: Q60993

SUMMARY
This article discusses the use of array constants as the field parameter in the Microsoft Excel DSUM function. To enter the =DSUM(database,field,criteria) function, do the following:


 * 1) Select the same number of cells as there are array constants entered in the field parameter of the DSUM function. The sample DSUM function below would have four cells selected.
 * 2) Enter the DSUM function as shown below. If the selected cells from Step 1 go across a row, enter commas between the array constants for the field parameter. If the selected cells go down a column, enter semicolons between the array constants as shown in the example.
 * 3) To enter formula as an array function, press CTRL+SHIFT+ENTER.

The following is an example:

DSUM Function
=DSUM(Database,{&quot;march&quot;,&quot;april&quot;,&quot;may&quot;,&quot;june&quot;},Criteria)

Database
name     march      april      may      june jon        4          3         2        1 suzie      9          8         7        6 steph      7          6         4        5 jon        5          2         9        0

Criteria
name     march      april      may      june =&quot;=jon&quot;

Results
9         5          11       1

This method can also be used with any of the following Dfunction commands, by using array constants for the field parameter: DAVERAGE DCOUNT DCOUNTA DMAX DPRODUCT DSTDEV DSTDEVP DSUM DVAR DVARP
 * }